-
Notifications
You must be signed in to change notification settings - Fork 7
[Userinfo endpoint] Exception if token was released with unspecified/unknow scope #84
Conversation
…pe (any claims belonging to it).
Give me an example of what an OP configuration with such a scope would look like . |
Yes Sir, Simplest as possible, just put "ciao" in allowed_scopes (OP side, regarding a specific RP).
this PR would only log the error saying to admins that theresn't any claims belonging to "ciao" scope. My configurations (as usual) are here, RP side: OP side: Mind that I use RDBMS definitions for client reg and allowed_scopes to them, so that's my UI: and allowed_scopes is here, as they would be a list :) |
Ah, this opens another can of worms. |
I've just checked it, I can say YES, it's a global configuration error that I'm facing in this PR and what you're are telling us is formally correct. The goal of this PR is to handle this misconfiguration with a human readable error/exception that could indicate to the admin that theresn't at least a scope with a valid claim to be released, so the userinfo endpoint it self raises the exception and this latter should be handled in the http view that handle the requests. So that, this is just for handling an exception and nothing more in terms of feature, design and cool stuffs. This PR would be also referenced to #70 because, a day, we'll have a global configuration validator to prevent this kind of errors. At this moment just an exception handling in a specific endpoint, if you agree |
A better approach that patches b76f28f
Error
How to reproduce
Configure a RP in OP with some custom/unknow scope in allowed_scopes.
Result after this PR
A specific Exception will be raised with a eloquent error message.