-
Notifications
You must be signed in to change notification settings - Fork 44
Set parameters in RevokeTokenRequest and RefreshTokenRequest #314
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR addresses issue #312 by enabling additional custom parameters to be passed through refresh token and revoke token requests. The changes ensure that when users provide custom parameters via UserTokenRequestParameters, those parameters are properly included in the underlying token and revocation requests.
Changes:
- Added support for passing custom parameters in
RefreshTokenRequestandRevokeTokenRequest - Added comprehensive test coverage for both refresh and revoke token scenarios with additional parameters
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| UserTokenManagementTests.cs | Added two new test cases verifying that custom parameters are correctly passed through refresh token and revoke token requests |
| OpenIdConnectUserTokenEndpoint.cs | Modified RefreshAccessTokenAsync and RevokeRefreshTokenAsync methods to include custom parameters from UserTokenRequestParameters |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
access-token-management/test/AccessTokenManagement.Tests/UserTokenManagementTests.cs
Show resolved
Hide resolved
access-token-management/test/AccessTokenManagement.Tests/UserTokenManagementTests.cs
Show resolved
Hide resolved
access-token-management/test/AccessTokenManagement.Tests/UserTokenManagementTests.cs
Show resolved
Hide resolved
e3d4733 to
fbfe515
Compare
Set parameters in RevokeTokenRequest and RefreshTokenRequest
Fixes #312.
Something to note here and that is if the user adds any of the typed properties in here such as "Scope", "Resource", etc and sets the typed properties, they'll receive an
InvalidOperationExceptionwith "Duplicate parameter: scope" for example.We could strip off the typed properties before we set them, but this might unnecessarily complicated the code for no real benefit.