- Successfully getting a KC token
- but send it to SpringBoot KC Adapter and it seems it can’t deserialize the token. Jackson deserializer errors out. It get’s hung up here:
“resource_access”: {
“.roles”: [
“manage-account”,
“view-profile”
]
},
it seems the “resource_access” “.roles” property value does not deserialize. It’s expecting an object but in the token it’s an array.
Throws this error using the Spring Boot KC Adapter:
“com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type org.keycloak.representations.AccessToken$Access from Array value (token JsonToken.START_ARRAY)
at [Source: (byte)”{“exp”:1654811701,“iat”:1654811401,“jti”:“212d543e-1f08-450a-9be3-4df4596eabc2”,“iss”:“http://keycloak:8080/realms/FennecRealm",“aud”:“account”,“sub”:“f55998b9-0877-4b12-a804-360830925567”,“typ”:“Bearer”,“azp”:“fennec-login”,“session_state”:“cc5f5670-52a6-4475-9d4c-c4fdc56e5f27”,“allowed-origins”:[""],“realm_access”:{“roles”:[“ADMIN”]},“scope”:"email profile”,“sid”:“cc5f5670-52a6-4475-9d4c-c4fdc56e5f27”,“resource_access”:{".roles":[“manage-account”,“view-profile”]},“email_verified”:false,“name”:"[truncated 113 bytes]; line: 1, column: 436] (through reference chain: org.keycloak.representations.AccessToken[“resource_access”]->java.util.LinkedHashMap[".roles"])"