Skip to content

v4 API: Exchange API Key and Secret for Access and Refresh Tokens on Plugin Upgrade#656

Merged
n7studios merged 13 commits intov4-api-oauth-testsfrom
v4-api-oauth-exchange-key-for-token
May 17, 2024
Merged

v4 API: Exchange API Key and Secret for Access and Refresh Tokens on Plugin Upgrade#656
n7studios merged 13 commits intov4-api-oauth-testsfrom
v4-api-oauth-exchange-key-for-token

Conversation

@n7studios
Copy link
Copy Markdown
Contributor

Summary

Automatically exchanges an existing Plugin installation's API Key and Secret for Access and Refresh Tokens when the Plugin is upgraded to 2.5.0 or higher, which introduces using the v4 API with OAuth.

Testing

  • testExchangeAPIKeyAndSecretForAccessToken: Tests that an existing Plugin installation's API Key and Secret are exchanged for Access and Refresh Tokens, which are then tested as working by making API calls through loading the Plugin's settings screen.

Checklist

@n7studios n7studios added this to the 2.5.0 milestone Apr 30, 2024
@n7studios n7studios self-assigned this Apr 30, 2024
@n7studios n7studios changed the base branch from v4-api-oauth to v4-api-oauth-tests May 13, 2024 16:34
@n7studios n7studios mentioned this pull request May 13, 2024
6 tasks
@n7studios n7studios marked this pull request as ready for review May 14, 2024 13:47
Copy link
Copy Markdown
Contributor

@noelherrick noelherrick left a comment

Choose a reason for hiding this comment

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

In the method name, the word exchange seems to imply that you are getting rid of the old auth credentials, which you are not, so perhaps lookup_access_token_by_api_secret would be better?

@n7studios n7studios merged commit cd2556e into v4-api-oauth-tests May 17, 2024
@n7studios n7studios deleted the v4-api-oauth-exchange-key-for-token branch June 26, 2024 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants