title: An error occurred while attempting to decode the Jwt: Signed JWT rejected: Another algorithm expected, or no matching key(s) found
body: <p>I am trying setup OAuth2-OpenID Connect with ForgeRock OpenAM integrated with spring security and am getting the following error</p>
  
  <pre><code>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
  </code></pre>
  
  <p>The Jwk .well-known uri returns the following supported algorithms:</p>
  
  <pre><code>"id_token_signing_alg_values_supported": [
      "PS384",
      "ES384",
      "RS384",
      "HS256",
      "HS512",
      "ES256",
      "RS256",
      "HS384",
      "ES512",
      "PS256",
      "PS512",
      "RS512"
    ]
  </code></pre>
  
  <p>The decoded JWT shows the following header:</p>
  
  <pre><code>{
    "typ": "JWT",
    "zip": "NONE",
    "alg": "HS256"
  }
  </code></pre>
  
  <p>Is there a way I can set a specific JwtDecoder based on the value coming from the header or enforce AM to use one particular algorithm?</p>