public class Cas2Authenticator extends Object implements NuxeoAuthenticationPlugin, NuxeoAuthenticationPluginLogoutExtension, LoginResponseHandler
| Modifier and Type | Field and Description | 
|---|---|
protected static String | 
ALTERNATIVE_AUTH_PLUGIN_COOKIE_NAME  | 
protected String | 
appURL  | 
protected static String | 
CAS_SERVER_HEADER_KEY  | 
protected static String | 
CAS_SERVER_PATTERN_KEY  | 
protected String | 
defaultCasServer  | 
protected String | 
errorPage  | 
protected static String | 
EXCLUDE_PROMPT_KEY  | 
protected List<String> | 
excludePromptURLs  | 
protected static org.apache.commons.logging.Log | 
log  | 
protected static String | 
LOGIN_ACTION  | 
protected static String | 
LOGOUT_ACTION  | 
protected String | 
logoutURL  | 
protected static String | 
NUXEO_SERVER_PATTERN_KEY  | 
protected boolean | 
promptLogin  | 
protected static String | 
PROXY_VALIDATE_ACTION  | 
protected String | 
proxyKey  | 
protected String | 
proxyValidateURL
We tell the CAS server whether we want a plain text (CAS 1.0) or XML (CAS 2.0) response by making the request
 either to the '.../validate' or '.../serviceValidate' URL. 
 | 
protected String | 
proxyValidatorClassName  | 
protected String | 
serviceKey  | 
protected String | 
serviceLoginURL  | 
protected String | 
serviceValidateURL  | 
protected String | 
ticketKey  | 
protected String | 
ticketValidatorClassName  | 
protected static String | 
VALIDATE_ACTION  | 
| Constructor and Description | 
|---|
Cas2Authenticator()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected String | 
checkCasTicket(String ticket,
              javax.servlet.http.HttpServletRequest httpRequest)  | 
protected String | 
checkProxyCasTicket(String ticket,
                   javax.servlet.http.HttpServletRequest httpRequest)  | 
protected NuxeoAuthenticationPlugin | 
getAlternativeAuthPlugin(javax.servlet.http.HttpServletRequest httpRequest,
                        javax.servlet.http.HttpServletResponse httpResponse)  | 
protected String | 
getAppURL(javax.servlet.http.HttpServletRequest httpRequest)  | 
protected javax.servlet.http.Cookie | 
getCookie(javax.servlet.http.HttpServletRequest httpRequest,
         String cookieName)  | 
protected String | 
getServiceURL(javax.servlet.http.HttpServletRequest httpRequest,
             String action)  | 
List<String> | 
getUnAuthenticatedURLPrefix()
Returns the list of prefix for unauthenticated URLs, typically the URLs associated to login prompt. 
 | 
Boolean | 
handleLoginPrompt(javax.servlet.http.HttpServletRequest httpRequest,
                 javax.servlet.http.HttpServletResponse httpResponse,
                 String baseURL)
Handles the Login Prompt. 
 | 
Boolean | 
handleLogout(javax.servlet.http.HttpServletRequest httpRequest,
            javax.servlet.http.HttpServletResponse httpResponse)
Handles logout operation. 
 | 
UserIdentificationInfo | 
handleRetrieveIdentity(javax.servlet.http.HttpServletRequest httpRequest,
                      javax.servlet.http.HttpServletResponse httpResponse)
Retrieves user identification information from the request. 
 | 
void | 
initPlugin(Map<String,String> parameters)
Initializes the Plugin from parameters set in the XML descriptor. 
 | 
Boolean | 
needLoginPrompt(javax.servlet.http.HttpServletRequest httpRequest)
Defines if the authentication plugin needs to do a login prompt. 
 | 
boolean | 
onError(javax.servlet.http.HttpServletRequest request,
       javax.servlet.http.HttpServletResponse response)
Handles the login error response. 
 | 
boolean | 
onSuccess(javax.servlet.http.HttpServletRequest arg0,
         javax.servlet.http.HttpServletResponse arg1)
Handles login success response. 
 | 
protected void | 
removeCookie(javax.servlet.http.HttpServletRequest httpRequest,
            javax.servlet.http.HttpServletResponse httpResponse,
            javax.servlet.http.Cookie cookie)  | 
protected static final String CAS_SERVER_HEADER_KEY
protected static final String CAS_SERVER_PATTERN_KEY
protected static final String NUXEO_SERVER_PATTERN_KEY
protected static final String LOGIN_ACTION
protected static final String LOGOUT_ACTION
protected static final String VALIDATE_ACTION
protected static final String PROXY_VALIDATE_ACTION
protected static final org.apache.commons.logging.Log log
protected static final String EXCLUDE_PROMPT_KEY
protected static final String ALTERNATIVE_AUTH_PLUGIN_COOKIE_NAME
protected String serviceLoginURL
protected String serviceValidateURL
protected String proxyValidateURL
protected String serviceKey
protected String defaultCasServer
protected String ticketValidatorClassName
protected String proxyValidatorClassName
protected boolean promptLogin
protected List<String> excludePromptURLs
public Cas2Authenticator()
public List<String> getUnAuthenticatedURLPrefix()
NuxeoAuthenticationPlugingetUnAuthenticatedURLPrefix in interface NuxeoAuthenticationPluginprotected String getServiceURL(javax.servlet.http.HttpServletRequest httpRequest, String action)
public Boolean handleLoginPrompt(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, String baseURL)
NuxeoAuthenticationPluginhandleLoginPrompt in interface NuxeoAuthenticationPluginhttpRequest - the requesthttpResponse - the responsepublic UserIdentificationInfo handleRetrieveIdentity(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)
NuxeoAuthenticationPluginhandleRetrieveIdentity in interface NuxeoAuthenticationPluginhttpRequest - the requesthttpResponse - the responsepublic void initPlugin(Map<String,String> parameters)
NuxeoAuthenticationPlugininitPlugin in interface NuxeoAuthenticationPluginpublic Boolean needLoginPrompt(javax.servlet.http.HttpServletRequest httpRequest)
NuxeoAuthenticationPluginneedLoginPrompt in interface NuxeoAuthenticationPluginpublic Boolean handleLogout(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)
NuxeoAuthenticationPluginLogoutExtensionGeneric logout (killing session and Seam objects) is done by LogoutActionBean This interface must be implemented by auth plugin when the target auth system needs a specific logout procedure.
handleLogout in interface NuxeoAuthenticationPluginLogoutExtensionprotected String checkProxyCasTicket(String ticket, javax.servlet.http.HttpServletRequest httpRequest)
protected String checkCasTicket(String ticket, javax.servlet.http.HttpServletRequest httpRequest)
public boolean onError(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
LoginResponseHandleronError in interface LoginResponseHandlerrequest - the HTTP requestresponse - the HTTP responsepublic boolean onSuccess(javax.servlet.http.HttpServletRequest arg0, javax.servlet.http.HttpServletResponse arg1)
LoginResponseHandleronSuccess in interface LoginResponseHandlerarg0 - the HTTP requestarg1 - the HTTP responseprotected NuxeoAuthenticationPlugin getAlternativeAuthPlugin(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)
protected javax.servlet.http.Cookie getCookie(javax.servlet.http.HttpServletRequest httpRequest, String cookieName)
protected void removeCookie(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, javax.servlet.http.Cookie cookie)
Copyright © 2019 Nuxeo. All rights reserved.