JSON object member with key "scope" has null value
Issue #281
resolved
Hi,
I use Spring security 5 to make some oauth authorizations. One of my partners returns this kind of oauth response:
{"access_token":"valid access token with a lot of characters","expires_in":1800,"
token_type":"bearer","scope":null,"refresh_token":"valid refresh token"}
With this response, i get the following exception:
com.nimbusds.oauth2.sdk.ParseException: JSON object member with key "scope" has null value
According to the specification, the ‘scope’ attribute is optional. I read through the source code, and it seems the Scope#parse method handles the null value:
if (s == null)
return null;
So, do you think you can remove the check about the exception?
Regards
Comments (4)
-
reporter -
Thanks for the detailed report, we’ll fix that.
-
Fixed: 54882512
-
- changed status to resolved
Released as version 6.18.1 (2019-11-18)
- Log in to comment
Maybe we could change (in
BearerAccessToken#parse
)to