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 String
CLEARTRUST_COOKIE_SESSION
protected static String
CLEARTRUST_COOKIE_SESSION_A
protected static String
CLEARTRUST_HEADER_UID
protected String
cleartrustLoginUrl
protected String
cleartrustLogoutUrl
protected String
cookieDomain
-
Constructor Summary
Constructors Constructor Description ClearTrustAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
displayCookieInformation(javax.servlet.http.Cookie[] cookies)
protected void
displayRequestInformation(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.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.Boolean
handleLogout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Handles logout operation.UserIdentificationInfo
handleRetrieveIdentity(javax.servlet.http.HttpServletRequest request, 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 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:NuxeoAuthenticationPlugin
Returns the list of prefix for unauthenticated URLs, typically the URLs associated to login prompt.- Specified by:
getUnAuthenticatedURLPrefix
in 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:
handleLoginPrompt
in 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:NuxeoAuthenticationPlugin
Retrieves user identification information from the request.- Specified by:
handleRetrieveIdentity
in interfaceNuxeoAuthenticationPlugin
- Parameters:
request
- the requesthttpResponse
- the response
-
needLoginPrompt
public Boolean needLoginPrompt(javax.servlet.http.HttpServletRequest request)
Description copied from interface:NuxeoAuthenticationPlugin
Defines if the authentication plugin needs to do a login prompt.- Specified by:
needLoginPrompt
in 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:NuxeoAuthenticationPluginLogoutExtension
Handles 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:
handleLogout
in 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:NuxeoAuthenticationPlugin
Initializes the Plugin from parameters set in the XML descriptor.- Specified by:
initPlugin
in interfaceNuxeoAuthenticationPlugin
-
-