Interface ImpersonationRequestValidator
- All Known Implementing Classes:
DefaultImpersonationRequestValidator
public interface ImpersonationRequestValidator
Validation interface for validation the impersonation of a user in the
ImpersonationEndpoint
.- Author:
- Nick Crum (ncrum)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
validateAnonymousImpersonation
(ImpersonationRequest impersonationRequest, String impersonatedClientId, String csrUserId) Validates that the CSR can impersonate an anonymous user in the client.void
validateImpersonationRequest
(ImpersonationRequest impersonationRequest, String authorizationUri, org.springframework.security.core.Authentication authentication) Validate that an impersonation request is valid.void
validateImpersonationRequestToken
(ImpersonationRequestToken impersonationRequestToken) Validate that an impersonation request token is valid.void
validateUserImpersonation
(ImpersonationRequest impersonationRequest, OAuth2UserDetails impersonatedUser, String csrUserId) Validates that the user requested to be impersonated is able to be impersonated.
-
Method Details
-
validateUserImpersonation
void validateUserImpersonation(ImpersonationRequest impersonationRequest, OAuth2UserDetails impersonatedUser, String csrUserId) Validates that the user requested to be impersonated is able to be impersonated. Validation includes various properties of a user, such as expired, locked, impersonation disabled, etc.- Parameters:
impersonatedUser
- The user to be impersonated.impersonationRequest
- The impersonation request.csrUserId
- The user ID of the user initiating the impersonation request.
-
validateAnonymousImpersonation
void validateAnonymousImpersonation(ImpersonationRequest impersonationRequest, String impersonatedClientId, String csrUserId) Validates that the CSR can impersonate an anonymous user in the client. Validation includes the access of the CSR to the requested client.- Parameters:
impersonatedClientId
- The ID of client to impersonate inimpersonationRequest
- The impersonation request.csrUserId
- The user ID of the user initiating the impersonation request.
-
validateImpersonationRequest
void validateImpersonationRequest(ImpersonationRequest impersonationRequest, String authorizationUri, org.springframework.security.core.Authentication authentication) Validate that an impersonation request is valid.- Parameters:
impersonationRequest
- This impersonation request.authorizationUri
- The uri requestedauthentication
- The current Spring Security authentication
-
validateImpersonationRequestToken
Validate that an impersonation request token is valid.- Parameters:
impersonationRequestToken
- This impersonation request token.
-