Class ImpersonationEndpoint
- java.lang.Object
- 
- com.broadleafcommerce.auth.user.web.endpoint.ImpersonationEndpoint
 
- 
 @FrameworkController public class ImpersonationEndpoint extends Object - Author:
- Nick Crum (ncrum)
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringCONSUME_TOKEN_PATHstatic StringIMPERSONATE_PATH
 - 
Constructor SummaryConstructors Constructor Description ImpersonationEndpoint(ImpersonationService impersonationService, ImpersonationRequestValidator requestValidator, OAuth2UserDetailsService userDetailsService, StatelessUtil statelessUtil)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddSessionCookie(javax.servlet.http.HttpServletResponse response, ImpersonationRequestToken impersonationRequest, OAuth2UserDetails impersonatedUser)org.springframework.web.servlet.ModelAndViewconsumeToken(javax.servlet.http.HttpServletResponse response, String token)protected StringgetCsrUserId(org.springframework.security.core.Authentication authentication)protected OAuth2UserDetailsgetUserToImpersonate(String clientId, String username)Stringimpersonate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ImpersonationRequest impersonationRequest, org.springframework.security.core.Authentication authentication)protected OAuth2UserDetailsloadAnonymousCsrUser(String clientId)
 
- 
- 
- 
Field Detail- 
CONSUME_TOKEN_PATHpublic static final String CONSUME_TOKEN_PATH - See Also:
- Constant Field Values
 
 - 
IMPERSONATE_PATHpublic static final String IMPERSONATE_PATH - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
ImpersonationEndpointpublic ImpersonationEndpoint(ImpersonationService impersonationService, ImpersonationRequestValidator requestValidator, OAuth2UserDetailsService userDetailsService, StatelessUtil statelessUtil) 
 
- 
 - 
Method Detail- 
impersonate@FrameworkGetMapping("/impersonate") @PreAuthorize("isAuthenticated() and hasAuthority(\'ALL_IMPERSONATE\')") public String impersonate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ImpersonationRequest impersonationRequest, org.springframework.security.core.Authentication authentication)
 - 
consumeToken@FrameworkGetMapping("/consume-token") public org.springframework.web.servlet.ModelAndView consumeToken(javax.servlet.http.HttpServletResponse response, @RequestParam("signedJwt") String token)
 - 
getUserToImpersonateprotected OAuth2UserDetails getUserToImpersonate(String clientId, String username) 
 - 
loadAnonymousCsrUserprotected OAuth2UserDetails loadAnonymousCsrUser(String clientId) 
 - 
addSessionCookieprotected void addSessionCookie(javax.servlet.http.HttpServletResponse response, ImpersonationRequestToken impersonationRequest, OAuth2UserDetails impersonatedUser)
 - 
getCsrUserIdprotected String getCsrUserId(org.springframework.security.core.Authentication authentication) 
 
- 
 
-