Skip to content

[ZL-874] Manually refresh and revoke tokens#39

Merged
njbbaer merged 8 commits intomasterfrom
ZL-874/refresh-and-revoke-tokens
Mar 11, 2021
Merged

[ZL-874] Manually refresh and revoke tokens#39
njbbaer merged 8 commits intomasterfrom
ZL-874/refresh-and-revoke-tokens

Conversation

@njbbaer
Copy link
Copy Markdown
Contributor

@njbbaer njbbaer commented Mar 2, 2021

Ticket: ZL-874

This PR adds functionality to allow clients to manually refresh and revoke their token.

Pretty simple:

client = Procore::Client.new( ... )
client.refresh
client.revoke # client will refresh token on its next request

@njbbaer njbbaer self-assigned this Mar 2, 2021
Comment thread CHANGELOG.md
Comment thread lib/procore/version.rb Outdated
@njbbaer
Copy link
Copy Markdown
Contributor Author

njbbaer commented Mar 7, 2021

Thanks for reviewing @PatKoperwas, but I still need to add the revoke functionality before I'll request review and merge it.

@njbbaer njbbaer marked this pull request as ready for review March 9, 2021 07:41
@njbbaer njbbaer requested a review from PatKoperwas March 9, 2021 07:41
@njbbaer
Copy link
Copy Markdown
Contributor Author

njbbaer commented Mar 9, 2021

@PatKoperwas I finished the revoke functionality, so it's ready for review.

Comment thread lib/procore/auth/access_token_credentials.rb Outdated
Comment thread lib/procore/client.rb Outdated
Comment thread lib/procore/client.rb Outdated
@njbbaer njbbaer changed the title [ZL-874] [WIP] Manually refresh and revoke tokens [ZL-874] Manually refresh and revoke tokens Mar 9, 2021
@njbbaer
Copy link
Copy Markdown
Contributor Author

njbbaer commented Mar 10, 2021

@PatKoperwas @gilmcquillan Thank you for the comments, I've updated it.

Comment thread lib/procore/client.rb
end
end

def revoke
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you want to add a comment above def revoke

# @raise [OAuthError] if a token cannot be revoked.

@njbbaer
Copy link
Copy Markdown
Contributor Author

njbbaer commented Mar 11, 2021

Thanks for the reviews. I'll merge this as soon as I'm satisfied it works with the sample app.

@njbbaer njbbaer merged commit 460f001 into master Mar 11, 2021
@njbbaer njbbaer deleted the ZL-874/refresh-and-revoke-tokens branch March 11, 2021 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants