Open chervand opened 7 years ago
@chervand have you found a way to accomplish this?
@DewaldBodenstein, I believe, adding it to a League\OAuth2\Server\ResponseTypes\BearerTokenResponse
$responseParams
should be enough.
Thanks, got it working.
@chervand That's nice. I think in most implementations, if the client requests scopes that aren't supported, the server should respond with an invalid_scope
error. However, this is really useful for situations where a scope is valid, but for some other reason has been denied (e.g. authorisation).
And as you rightly mention, it follows spec. In fact, I'd go so far as to say that it's worth having in the response regardless.
Do you fancy making a pull request for this?
@simonhamp yes, sure
+1, this would be very useful.
According to https://tools.ietf.org/html/rfc6749#section-5.1
and https://tools.ietf.org/html/rfc6749#section-3.3
Is it possible to return
scope
value as a request param by default to notify clients about actually granted scopes (in case default or omitted ones) without need of parsing JWT?