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
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.oauth2.common.OAuth2AccessToken
enhance
(org.springframework.security.oauth2.common.OAuth2AccessToken accessToken, org.springframework.security.oauth2.provider.OAuth2Authentication authentication) Based on the implementation fromJwtAccessTokenConverter.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 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 fromJwtAccessTokenConverter.enhance(OAuth2AccessToken, OAuth2Authentication)
. Add support for the oid parameter.- Specified by:
enhance
in interfaceorg.springframework.security.oauth2.provider.token.TokenEnhancer
- Overrides:
enhance
in classorg.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter
- Parameters:
accessToken
- the current access token with its expiration and refresh tokenauthentication
- the current authentication including client and user details- Returns:
- a new token enhanced with additional information
-