Interface AMPostAuthProcessInterface
- 
 @SupportedAll public interface AMPostAuthProcessInterface TheAMPostAuthProcessInterfaceinterface needs to be implemented by services and applications to do post authentication processing.This interface is invoked by the OpenAM Authentication service on a successful authentication, failed authentication or during logout. This interface has three methods onLoginSuccess,onLoginFailureandonLogout. TheonLoginSuccesswill be invoked when authentication is successful. TheonFailurewill be invoked on failed authentication. TheonLogoutis invoked during a logout.The post processing class implementation can be configured per ORGANIZATION or SERVICE or ROLE 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringPOST_PROCESS_LOGIN_FAILURE_URLConstant to represent SPI redirect URL on login failure.static StringPOST_PROCESS_LOGIN_SUCCESS_URLConstant to represent SPI redirect URL on login success.static StringPOST_PROCESS_LOGOUT_URLConstant to represent SPI redirect URL on logout.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonLoginFailure(Map requestParamsMap, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Post processing on failed authentication.voidonLoginSuccess(Map requestParamsMap, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, SSOToken ssoToken)Post processing on successful authentication.voidonLogout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, SSOToken ssoToken)Post processing on Logout.
 
- 
- 
- 
Field Detail- 
POST_PROCESS_LOGIN_SUCCESS_URLstatic final String POST_PROCESS_LOGIN_SUCCESS_URL Constant to represent SPI redirect URL on login success. Following sample code explains how to use this onLoginSuccess.public void onLoginSuccess(Map requestParamsMap,HttpServletRequest request, HttpServletResponse response,SSOToken ssoToken)throws AuthenticationException { // Set redirect URL on login success, User will be redirected to this URL on success. if (request != null) request.setAttribute( AMPostAuthProcessInterface.POST_PROCESS_LOGIN_SUCCESS_URL, "http://www.sun.com"); }Note: Setting this property will take precendence over a session proeprtyPOST_PROCESS_SUCCESS_URL, which can also be configured to redirect users after successful authentication.- See Also:
- Constant Field Values
 
 - 
POST_PROCESS_LOGIN_FAILURE_URLstatic final String POST_PROCESS_LOGIN_FAILURE_URL Constant to represent SPI redirect URL on login failure. Following sample code explains how to use this onLoginFailure.public void onLoginFailure(Map requestParamsMap,HttpServletRequest request, HttpServletResponse response,SSOToken ssoToken)throws AuthenticationException { // Set redirect URL on login failure, User will be redirected to this URL on failure. if (request != null) request.setAttribute( AMPostAuthProcessInterface.POST_PROCESS_LOGIN_FAILURE_URL, "http://www.example.com"); }- See Also:
- Constant Field Values
 
 - 
POST_PROCESS_LOGOUT_URLstatic final String POST_PROCESS_LOGOUT_URL Constant to represent SPI redirect URL on logout. Following sample code explains how to use this onLogout.public void onLoginFailure(Map requestParamsMap,HttpServletRequest request, HttpServletResponse response,SSOToken ssoToken)throws AuthenticationException { // Set redirect URL on logout, User will be redirected to this URL on logout. if (request != null) request.setAttribute( AMPostAuthProcessInterface.POST_PROCESS_LOGOUT_URL, "http://opensso.dev.java.net"); }- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
onLoginSuccessvoid onLoginSuccess(Map requestParamsMap, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, SSOToken ssoToken) throws AuthenticationException Post processing on successful authentication.- Parameters:
- requestParamsMap- map containing- HttpServletRequestparameters
- request-- HttpServletRequestobject.
- response-- HttpServletResponseobject.
- ssoToken- authenticated user's single sign token.
- Throws:
- AuthenticationException- if there is an error.
 
 - 
onLoginFailurevoid onLoginFailure(Map requestParamsMap, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws AuthenticationException Post processing on failed authentication.- Parameters:
- requestParamsMap- map containing- HttpServletRequestparameters.
- request-- HttpServletRequestobject.
- response-- HttpServletResponseobject.
- Throws:
- AuthenticationException- when there is an error.
 
 - 
onLogoutvoid onLogout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, SSOToken ssoToken) throws AuthenticationExceptionPost processing on Logout.- Parameters:
- request-- HttpServletRequestobject.
- response-- HttpServletResponseobject.
- ssoToken- authenticated user's single sign on token.
- Throws:
- AuthenticationException- when there is an error.
 
 
- 
 
-