Class DefaultImpersonationClaimsEnhancer
java.lang.Object
com.broadleafcommerce.auth.user.service.DefaultImpersonationClaimsEnhancer
- All Implemented Interfaces:
ImpersonationClaimsEnhancer
public class DefaultImpersonationClaimsEnhancer
extends Object
implements ImpersonationClaimsEnhancer
- Author:
- Nick Crum (ncrum)
-
Constructor Summary
ConstructorDescriptionDefaultImpersonationClaimsEnhancer
(AuthorizationServerProperties properties, UserService<User> userService, UserRoleService<UserRole> userRoleService, UserRoleAncestryHydrationService roleAncestryHydrationService) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addCsrClaims
(ImpersonationRequestToken impersonationRequestToken, User csr, Map<String, Object> enhancedClaims) protected void
addSessionExpiration
(Map<String, Object> enhancedClaims) protected void
addWhitelistedAuthorities
(Map<String, Object> enhancedClaims, User user) enhance
(Map<String, Object> claims, OAuth2UserDetails impersonatedUser, ImpersonationRequestToken impersonationRequestToken) Provides an opportunity for customization of the claims for an impersonatedOAuth2SessionToken
.
-
Constructor Details
-
DefaultImpersonationClaimsEnhancer
public DefaultImpersonationClaimsEnhancer(AuthorizationServerProperties properties, UserService<User> userService, UserRoleService<UserRole> userRoleService, UserRoleAncestryHydrationService roleAncestryHydrationService)
-
-
Method Details
-
enhance
public Map<String,Object> enhance(Map<String, Object> claims, OAuth2UserDetails impersonatedUser, ImpersonationRequestToken impersonationRequestToken) Description copied from interface:ImpersonationClaimsEnhancer
Provides an opportunity for customization of the claims for an impersonatedOAuth2SessionToken
.- Specified by:
enhance
in interfaceImpersonationClaimsEnhancer
- Parameters:
claims
- The claimsimpersonatedUser
- The impersonated userimpersonationRequestToken
- The impersonation request token- Returns:
- the enhanced claims
- See Also:
-
addCsrClaims
protected void addCsrClaims(ImpersonationRequestToken impersonationRequestToken, User csr, Map<String, Object> enhancedClaims) -
addSessionExpiration
-
addWhitelistedAuthorities
-