Class UserTokenEnhancer

  • All Implemented Interfaces:
    org.springframework.security.oauth2.provider.token.TokenEnhancer

    public class UserTokenEnhancer
    extends AbstractUserTokenEnhancer
    Token enhancer that puts various relevant user data into the token's OAuth2AccessToken.getAdditionalInformation().

    Author:
    Samarth Dhruva (samarthd), Nick Crum (ncrum)
    • Constructor Detail

      • UserTokenEnhancer

        public UserTokenEnhancer()
    • 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)
      • getUserTokenClaims

        protected Map<String,​Object> getUserTokenClaims​(org.springframework.security.oauth2.provider.OAuth2Authentication authentication)
      • putServiceIdClaim

        protected void putServiceIdClaim​(Map<String,​Object> userData,
                                         User user)