-
Notifications
You must be signed in to change notification settings - Fork 15
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
Feature/issue1058 #1059
base: dev
Are you sure you want to change the base?
Feature/issue1058 #1059
Conversation
return null | ||
} | ||
|
||
if (request.isUserInRole(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.
does isUserInRole check scope attribute or just role attribute?
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.
Yes, for M2M tokens it applies the role check to the scopes rather than the user profile roles. The alternatives I could find to identify M2M was to check the principal (which is set to the clientId) or a check of the profile class (which introduces a dependency on the plugin implementation).
I thought since we otherwise were using the scopes it made sense to go with that approach?
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.
(The disadvantage of checking the client id is we need to manage a list of authorized clients)
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.
Thanks, looks good to me. I was just checking.
Please don't merge this one yet @temi - needs a bit of testing before being committed to the next release