- changed status to open
AuthorizationGrant.parse with a map missing grant type throws weird exception
Issue #338
resolved
If the AuthorizationGrant.parse(final Map<String,List<String>> params) method is called with a map that doesn’t contain grant_type, quite weird exception is thrown.
try {
AuthorizationGrant.parse(new HashMap<>());
} catch (Exception e) {
e.printStackTrace();
}
STDOUT:
java.lang.IllegalArgumentException: Illegal char(s) in description, see RFC 6749, section 5.2
at com.nimbusds.oauth2.sdk.ErrorObject.<init>(ErrorObject.java:148)
at com.nimbusds.oauth2.sdk.ErrorObject.appendDescription(ErrorObject.java:211)
at com.nimbusds.oauth2.sdk.AuthorizationGrant.parse(AuthorizationGrant.java:113)
I’m using oauth2-oidc-sdk-8.33.jar
Comments (3)
-
-
- changed status to resolved
Fixed in commit f8dd113 , releasing as v 8.33.1.
Happy coding!
-
There was a release hiccup, check out v8.33.2 instead please.
- Log in to comment
Thanks for the report.
That's probably due to this:
https://tools.ietf.org/html/rfc6749#section-5.2
Will add a test.