public class CustomerContextTokenEnhancer extends AbstractUserTokenEnhancer
This mainly comes into play for UserType.ADMIN and UserType.CUSTOMER users. This
allows us to validate that an Admin is able to read a particular customer or customers, and that
a customer can only read data within their specific customer context.
Application.getCustomerContextId()| Constructor and Description |
|---|
CustomerContextTokenEnhancer(ApplicationService<Application> applicationService) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCustomerContextIds(org.springframework.security.oauth2.common.DefaultOAuth2AccessToken enhanceableToken,
Collection<String> customerContextIds) |
org.springframework.security.oauth2.common.OAuth2AccessToken |
enhance(org.springframework.security.oauth2.common.OAuth2AccessToken accessToken,
org.springframework.security.oauth2.provider.OAuth2Authentication authentication) |
protected ApplicationService<Application> |
getApplicationService() |
protected boolean |
isAssignedToApplication(User user) |
protected void |
setCustomerContextIds(Collection<String> customerContextIds,
org.springframework.security.oauth2.common.DefaultOAuth2AccessToken enhanceableToken) |
getUser, getUserService, isAnonymousCsrImpersonation, setUserContext, setUserService, shouldEnhancepublic CustomerContextTokenEnhancer(ApplicationService<Application> applicationService)
public org.springframework.security.oauth2.common.OAuth2AccessToken enhance(org.springframework.security.oauth2.common.OAuth2AccessToken accessToken,
org.springframework.security.oauth2.provider.OAuth2Authentication authentication)
protected boolean isAssignedToApplication(User user)
protected void setCustomerContextIds(Collection<String> customerContextIds, org.springframework.security.oauth2.common.DefaultOAuth2AccessToken enhanceableToken)
protected void addCustomerContextIds(org.springframework.security.oauth2.common.DefaultOAuth2AccessToken enhanceableToken,
Collection<String> customerContextIds)
protected ApplicationService<Application> getApplicationService()
Copyright © 2021. All rights reserved.