Class OriginalAwareJwtAccessTokenConverter

java.lang.Object
org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter
com.broadleafcommerce.auth.token.service.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
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OriginalAwareJwtAccessTokenConverter

      public OriginalAwareJwtAccessTokenConverter()
  • Method Details

    • 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