code: @Override
      public OAuth2Authentication extractAuthentication(Map<String, ?> claims) {
          OAuth2Authentication authentication = super.extractAuthentication(claims);
          authentication.setDetails(claims);
          return authentication;
      }
docs: Extract JWT claims and set it to OAuth2Authentication decoded details.
  Here is how to get details:
  
  <pre>
  <code>
  SecurityContext securityContext = SecurityContextHolder.getContext();
  Authentication authentication = securityContext.getAuthentication();
  if (authentication != null) {
  Object details = authentication.getDetails();
  if(details instanceof OAuth2AuthenticationDetails) {
  Object decodedDetails = ((OAuth2AuthenticationDetails) details).getDecodedDetails();
  if(decodedDetails != null &amp;&amp; decodedDetails instanceof Map) {
  String detailFoo = ((Map) decodedDetails).get("foo");
  }
  }
  }
  </code>
  </pre>
  @param claims OAuth2JWTToken claims
  @return OAuth2Authentication