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
Constructors Constructor Description DefaultImpersonationClaimsEnhancer(AuthorizationServerProperties properties, UserService<User> userService, UserRoleService<UserRole> userRoleService, UserRoleAncestryHydrationService roleAncestryHydrationService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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)
Map<String,Object>
enhance(Map<String,Object> claims, OAuth2UserDetails impersonatedUser, ImpersonationRequestToken impersonationRequestToken)
Provides an opportunity for customization of the claims for an impersonatedOAuth2SessionToken
.
-
-
-
Constructor Detail
-
DefaultImpersonationClaimsEnhancer
public DefaultImpersonationClaimsEnhancer(AuthorizationServerProperties properties, UserService<User> userService, UserRoleService<UserRole> userRoleService, UserRoleAncestryHydrationService roleAncestryHydrationService)
-
-
Method Detail
-
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:
ImpersonationService.generateImpersonationToken(ImpersonationRequest, Authentication)
,ImpersonationService.consumeImpersonationToken(String)
-
addCsrClaims
protected void addCsrClaims(ImpersonationRequestToken impersonationRequestToken, User csr, Map<String,Object> enhancedClaims)
-
-