Class OriginalAwareJwtAccessTokenConverter

  • All Implemented Interfaces:
    org.springframework.beans.factory.InitializingBean, org.springframework.security.oauth2.provider.token.AccessTokenConverter, org.springframework.security.oauth2.provider.token.TokenEnhancer

    public class OriginalAwareJwtAccessTokenConverter
    extends org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter
    Token enhancer to add the value oid to the token, if it exists. oid represents the RefreshToken.getAncestor() value.
    • Field Summary

      • Fields inherited from class org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter

        ACCESS_TOKEN_ID, TOKEN_ID
      • Fields inherited from interface org.springframework.security.oauth2.provider.token.AccessTokenConverter

        ATI, AUD, AUTHORITIES, CLIENT_ID, EXP, GRANT_TYPE, JTI, SCOPE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.springframework.security.oauth2.common.OAuth2AccessToken enhance​(org.springframework.security.oauth2.common.OAuth2AccessToken accessToken, org.springframework.security.oauth2.provider.OAuth2Authentication authentication)
      Based on the implementation from JwtAccessTokenConverter.enhance(OAuth2AccessToken, OAuth2Authentication).
      • Methods inherited from class org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter

        afterPropertiesSet, convertAccessToken, decode, encode, extractAccessToken, extractAuthentication, getAccessTokenConverter, getJwtClaimsSetVerifier, getKey, isPublic, isRefreshToken, setAccessTokenConverter, setJwtClaimsSetVerifier, setKeyPair, setSigner, setSigningKey, setVerifier, setVerifierKey
    • Constructor Detail

      • OriginalAwareJwtAccessTokenConverter

        public OriginalAwareJwtAccessTokenConverter()
    • Method Detail

      • enhance

        public org.springframework.security.oauth2.common.OAuth2AccessToken enhance​(org.springframework.security.oauth2.common.OAuth2AccessToken accessToken,
                                                                                    org.springframework.security.oauth2.provider.OAuth2Authentication authentication)
        Based on the implementation from JwtAccessTokenConverter.enhance(OAuth2AccessToken, OAuth2Authentication). Add support for the oid parameter.
        Specified by:
        enhance in interface org.springframework.security.oauth2.provider.token.TokenEnhancer
        Overrides:
        enhance in class org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter
        Parameters:
        accessToken - the current access token with its expiration and refresh token
        authentication - the current authentication including client and user details
        Returns:
        a new token enhanced with additional information