Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force refresh token #349

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

rkcreation
Copy link
Contributor

All Submissions:

Changes proposed in this Pull Request:

Add callable Wordpress action to force a token refresh:

do_action( 'openid-connect-generic-refresh-token' );

How to test the changes in this Pull Request:

  1. Change user realm_access outside of wordpress
  2. Check Wordpress what access_token realm_access contains (outdated informations)
  3. Use the new action do_action( 'openid-connect-generic-refresh-token' );
  4. Check Wordpress what access_token realm_access contains (refreshed informations)

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?

Changelog entry

Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.

This PR contains also #338 (required to work). So, for both:

  • Add new wordpress actions: openid-connect-generic-refresh-token and openid-connect-generic-refresh-user-claim
  • Rewrite ensure_tokens_still_fresh to a protected method that handles bool param to force the refresh, no matter if time is expired
  • After the token was refreshed, ensure that user claim is updated (by calling new openid-connect-generic-refresh-user-claim action)

@josepedrocorreia
Copy link

Hi there,
We're using this plugin on our website and have recently been facing issues that I have a feeling might be related to what this PR tries to fix. Are there plans for this to be reviewed and released soon?
Cheers,
Pedro

@timnolte timnolte self-assigned this Dec 29, 2021
@timnolte timnolte added enhancement Issues & PRs related to new features. status: needs review PR that needs review. labels Jan 4, 2022
@timnolte timnolte deleted the branch oidc-wp:develop December 23, 2023 00:56
@timnolte timnolte closed this Dec 23, 2023
@timnolte timnolte reopened this Dec 23, 2023
@timnolte timnolte changed the base branch from dev to develop December 23, 2023 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues & PRs related to new features. status: needs review PR that needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants