Skip to content

Adding an ::OAuthClients::ConnectionManager to save, refresh and use OAuthClientTokens#10708

Merged
wielinde merged 4 commits into
devfrom
feature/file-links-oauth-connection-manager
Jun 13, 2022
Merged

Adding an ::OAuthClients::ConnectionManager to save, refresh and use OAuthClientTokens#10708
wielinde merged 4 commits into
devfrom
feature/file-links-oauth-connection-manager

Conversation

@wielinde
Copy link
Copy Markdown
Member

@wielinde wielinde commented May 23, 2022

https://community.openproject.org/wp/42578

  • Migration and model for OAuthClientToken
  • Implement OAuth2 callback flow that takes a code and requests the access token etc.
  • OAuthClients::ConnectionManager to
    • fetch existing tokens from DB or redirect URI if no token was yet stored.
    • fetch access token with a code
    • renew access token with a refresh token

@wielinde wielinde force-pushed the feature/file-links-oauth-connection-manager branch 2 times, most recently from 7c6b963 to 0454789 Compare June 6, 2022 08:08
Comment thread app/controllers/oauth_clients_controller.rb Fixed
Comment thread app/controllers/oauth_clients_controller.rb Fixed
Comment thread app/controllers/oauth_clients_controller.rb Fixed
@wielinde wielinde force-pushed the feature/file-links-oauth-connection-manager branch from 0454789 to 746d56c Compare June 7, 2022 08:50
Comment thread app/controllers/oauth_clients_controller.rb Fixed
Comment thread app/controllers/oauth_clients_controller.rb Fixed
@wielinde wielinde force-pushed the feature/file-links-oauth-connection-manager branch from 746d56c to 5cbfc15 Compare June 7, 2022 11:05
@wielinde wielinde changed the title Adding an OAuthClients::ConnectionManager to save, refresh and use OAuthClientTokens Adding an ::OAuthClients::ConnectionManager to save, refresh and use OAuthClientTokens Jun 7, 2022
@wielinde wielinde force-pushed the feature/file-links-oauth-connection-manager branch 3 times, most recently from bffd48b to 07e9ad0 Compare June 7, 2022 11:39
@wielinde wielinde marked this pull request as ready for review June 7, 2022 11:40
@wielinde wielinde requested a review from Kharonus June 7, 2022 11:40
@wielinde wielinde force-pushed the feature/file-links-oauth-connection-manager branch from 07e9ad0 to fcf3f34 Compare June 7, 2022 14:06
Copy link
Copy Markdown
Member

@Kharonus Kharonus left a comment

Choose a reason for hiding this comment

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

Looks already quite great. Some open questions remain.

Comment thread app/models/oauth_client_token.rb
Comment thread app/services/oauth_clients/connection_manager.rb
Comment thread app/services/oauth_clients/connection_manager.rb Outdated
Comment thread app/services/oauth_clients/connection_manager.rb Outdated
Comment thread app/controllers/oauth_clients_controller.rb Fixed
Comment thread app/controllers/oauth_clients_controller.rb Fixed
@wielinde wielinde force-pushed the feature/file-links-oauth-connection-manager branch from 10b7911 to 8a4c353 Compare June 10, 2022 14:41
@wielinde wielinde requested a review from Kharonus June 10, 2022 16:24
Copy link
Copy Markdown
Member

@Kharonus Kharonus left a comment

Choose a reason for hiding this comment

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

New changes LGTM, just have a question popping out. And I will spend some time now to test it a bit.

Comment thread app/controllers/oauth_clients_controller.rb
@wielinde wielinde merged commit 2f1bbe5 into dev Jun 13, 2022
@wielinde wielinde deleted the feature/file-links-oauth-connection-manager branch June 13, 2022 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants