我正在尝试使用与spring security集成的ForgeRock OpenAM设置OAuth2-OpenID Connect,但是出现以下错误
2019-06-17 15:01:42.576 DEBUG 62255 --- [nio-8090-exec-2] .o.s.r.w.BearerTokenAuthenticationFilter :
Authentication request for failed: org.springframework.security.oauth2.core.OAuth2AuthenticationException:
An error occurred while attempting to decode the Jwt:
Signed JWT rejected: Another algorithm expected, or no matching key(s) found
Jwk .well-known uri返回以下支持的算法:
"id_token_signing_alg_values_supported": [
"PS384",
"ES384",
"RS384",
"HS256",
"HS512",
"ES256",
"RS256",
"HS384",
"ES512",
"PS256",
"PS512",
"RS512"
]
解码后的JWT显示以下标头:
{
"typ": "JWT",
"zip": "NONE",
"alg": "HS256"
}
有没有一种方法可以根据标头中的值设置特定的JwtDecoder,或强制AM使用特定的算法?