openid-connect-generic
openid-connect-generic copied to clipboard
Force refresh token
All Submissions:
- [x] Have you followed the plugin Contributing guideline?
- [x] Does your code follow the WordPress' coding standards?
- [x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
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:
- Change user realm_access outside of wordpress
- Check Wordpress what access_token realm_access contains (outdated informations)
- Use the new action
do_action( 'openid-connect-generic-refresh-token' );
- 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
andopenid-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)
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