5

I am using OAuth2 with Spring Security. My authentication manager configures client via database: clients.jdbc(dataSource());

Everything works, but when requesting a token, I get an exception:

2017-04-28 11:14:39.656  WARN 1200 --- [io-8096-exec-10] o.s.s.o.p.c.JdbcClientDetailsService     : Could not decode JSON for additional information: BaseClientDetails [clientId=myclientid, clientSecret=mysecret, scope=[myscope], resourceIds=[], authorizedGrantTypes=[authorization_code, refresh_token], registeredRedirectUris=null, authorities=[], accessTokenValiditySeconds=36000, refreshTokenValiditySeconds=36000, additionalInformation={}]

with trace:

org.codehaus.jackson.JsonParseException: Unexpected character ('a' (code 97)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: java.io.StringReader@557a138f; line: 1, column: 2]
...
...

where the column additional_information (varchar(4096)) in table client_details is "asdf" for this entry.

I also tried to change the type of additional_information from String to Map<String, Object> and inserting a string by putting and getting it into the map with the key 'info'. After this, I get the same error, with different trace:

org.codehaus.jackson.JsonParseException: Unrecognized token 'asdf': was expecting at [Source: java.io.StringReader@3e8a7a77; line: 1, column: 21]
...
...

How can I include additional_information into my token?

dur
  • 15,689
  • 25
  • 79
  • 125
rumpel
  • 495
  • 9
  • 23

0 Answers0