我正在尝试使用集成了 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 使用一种特定的算法?