public final class TokenEnhancerUtil extends Object
Modifier and Type | Method and Description |
---|---|
static org.springframework.security.oauth2.common.DefaultOAuth2AccessToken |
getEnhanceableToken(org.springframework.security.oauth2.common.OAuth2AccessToken accessToken)
Copies the supplied OAuth2AccessToken to a new
DefaultOAuth2AccessToken instance and
copies any existing values in OAuth2AccessToken.getAdditionalInformation() to a new
modifiable map that may be retrieved and modified to add new claims. |
static OAuth2SessionToken |
getSessionToken(org.springframework.security.oauth2.provider.OAuth2Authentication authentication)
Returns the SessionToken associated with the OAuth2Authentication supplied
|
static String |
readPrincipal(org.springframework.security.oauth2.provider.OAuth2Authentication authentication) |
static String |
readUserId(org.springframework.security.oauth2.provider.OAuth2Authentication authentication)
Reads the user ID associated with the Session Token.
|
public static String readUserId(org.springframework.security.oauth2.provider.OAuth2Authentication authentication)
authentication
- The OAuth2Authentication object passed to the Token enhancerpublic static String readPrincipal(org.springframework.security.oauth2.provider.OAuth2Authentication authentication)
public static org.springframework.security.oauth2.common.DefaultOAuth2AccessToken getEnhanceableToken(org.springframework.security.oauth2.common.OAuth2AccessToken accessToken)
DefaultOAuth2AccessToken
instance and
copies any existing values in OAuth2AccessToken.getAdditionalInformation()
to a new
modifiable map that may be retrieved and modified to add new claims.OAuth2AccessToken.getAdditionalInformation()
public static OAuth2SessionToken getSessionToken(org.springframework.security.oauth2.provider.OAuth2Authentication authentication)
authentication
- The OAuth2Authentication object passed to the Token enhancerCopyright © 2021. All rights reserved.