Class ClearTrustAuthenticator
- java.lang.Object
-
- org.nuxeo.ecm.platform.ui.web.auth.cleartrust.ClearTrustAuthenticator
-
- All Implemented Interfaces:
NuxeoAuthenticationPlugin,NuxeoAuthenticationPluginLogoutExtension
public class ClearTrustAuthenticator extends Object implements NuxeoAuthenticationPlugin, NuxeoAuthenticationPluginLogoutExtension
- Author:
- M.-A. Darche
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringCLEARTRUST_COOKIE_SESSIONprotected static StringCLEARTRUST_COOKIE_SESSION_Aprotected static StringCLEARTRUST_HEADER_UIDprotected StringcleartrustLoginUrlprotected StringcleartrustLogoutUrlprotected StringcookieDomain
-
Constructor Summary
Constructors Constructor Description ClearTrustAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddisplayCookieInformation(javax.servlet.http.Cookie[] cookies)protected voiddisplayRequestInformation(javax.servlet.http.HttpServletRequest request)protected javax.servlet.http.Cookie[]getCookies(javax.servlet.http.HttpServletRequest request)List<String>getUnAuthenticatedURLPrefix()Returns the list of prefix for unauthenticated URLs, typically the URLs associated to login prompt.BooleanhandleLoginPrompt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String baseURL)Redirects to the ClearTrust login page if the request doesn't contain cookies indicating that a positive authentication occurred.BooleanhandleLogout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Handles logout operation.UserIdentificationInfohandleRetrieveIdentity(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse httpResponse)Retrieves user identification information from the request.voidinitPlugin(Map<String,String> parameters)Initializes the Plugin from parameters set in the XML descriptor.BooleanneedLoginPrompt(javax.servlet.http.HttpServletRequest request)Defines if the authentication plugin needs to do a login prompt.
-
-
-
Field Detail
-
CLEARTRUST_HEADER_UID
protected static final String CLEARTRUST_HEADER_UID
- See Also:
- Constant Field Values
-
CLEARTRUST_COOKIE_SESSION_A
protected static final String CLEARTRUST_COOKIE_SESSION_A
- See Also:
- Constant Field Values
-
CLEARTRUST_COOKIE_SESSION
protected static final String CLEARTRUST_COOKIE_SESSION
- See Also:
- Constant Field Values
-
cookieDomain
protected String cookieDomain
-
cleartrustLoginUrl
protected String cleartrustLoginUrl
-
cleartrustLogoutUrl
protected String cleartrustLogoutUrl
-
-
Method Detail
-
getUnAuthenticatedURLPrefix
public List<String> getUnAuthenticatedURLPrefix()
Description copied from interface:NuxeoAuthenticationPluginReturns the list of prefix for unauthenticated URLs, typically the URLs associated to login prompt.- Specified by:
getUnAuthenticatedURLPrefixin interfaceNuxeoAuthenticationPlugin
-
handleLoginPrompt
public Boolean handleLoginPrompt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String baseURL)
Redirects to the ClearTrust login page if the request doesn't contain cookies indicating that a positive authentication occurred.- Specified by:
handleLoginPromptin interfaceNuxeoAuthenticationPlugin- Parameters:
request- the requestresponse- the response- Returns:
- true if AuthFilter must stop execution (ie: login prompt generated a redirect), false otherwise
-
handleRetrieveIdentity
public UserIdentificationInfo handleRetrieveIdentity(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse httpResponse)
Description copied from interface:NuxeoAuthenticationPluginRetrieves user identification information from the request.- Specified by:
handleRetrieveIdentityin interfaceNuxeoAuthenticationPlugin- Parameters:
request- the requesthttpResponse- the response
-
needLoginPrompt
public Boolean needLoginPrompt(javax.servlet.http.HttpServletRequest request)
Description copied from interface:NuxeoAuthenticationPluginDefines if the authentication plugin needs to do a login prompt.- Specified by:
needLoginPromptin interfaceNuxeoAuthenticationPlugin- Returns:
- true if LoginPrompt is used
-
handleLogout
public Boolean handleLogout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Description copied from interface:NuxeoAuthenticationPluginLogoutExtensionHandles logout operation.Generic 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.
- Specified by:
handleLogoutin interfaceNuxeoAuthenticationPluginLogoutExtension- Returns:
- true if there is a redirection
-
getCookies
protected javax.servlet.http.Cookie[] getCookies(javax.servlet.http.HttpServletRequest request)
-
displayCookieInformation
protected void displayCookieInformation(javax.servlet.http.Cookie[] cookies)
-
displayRequestInformation
protected void displayRequestInformation(javax.servlet.http.HttpServletRequest request)
-
initPlugin
public void initPlugin(Map<String,String> parameters)
Description copied from interface:NuxeoAuthenticationPluginInitializes the Plugin from parameters set in the XML descriptor.- Specified by:
initPluginin interfaceNuxeoAuthenticationPlugin
-
-