-
Notifications
You must be signed in to change notification settings - Fork 129
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
Add required scopes to token and renewAuth requests #654
Conversation
@JvmStatic | ||
public fun newBuilderWithRequiredScope(): ParameterBuilder { | ||
return newBuilder() | ||
.setScope(OidcUtils.REQUIRED_SCOPE) |
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.
If the developer is already adding the openid
scope, will this result in it being duplicated?
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.
If you see the setScope
method, it will use includeRequiredScope
which avoids repetition as you mentioned. There are existing internal mechanisms to avoid this.
This change caused unexpected behavior in our app. Previously we specified When using Before this change With this change the Is this intended or a bug? |
I compared if (scope != null) {
request.addParameter("scope", scope)
} This re-adds the scope if one was specified in |
@d4rken I agree, we have to revert this commit. We will cut a release soon (today or tomorrow) |
Thanks for the quick response. |
Changes
We have added required scope to
renewAuth
andtoken
requests inAuthenticationAPIClient
. Up until now these methods wouldn't have worked without adding scope "openid" to the request. This didn't have effect on internal usage as we always added the default scopes. But usage outside through the API client will fail always until the scope is added.References
#648
Testing
Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. Since this library has unit testing, tests should be added for new functionality and existing tests should complete without errors.
This change adds unit test coverage
This change adds integration test coverage
This change has been tested on the latest version of the platform/language or why not