Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.ui.web.auth.plugins
Class AnonymousAuthenticator

java.lang.Object
  extended by org.nuxeo.ecm.platform.ui.web.auth.plugins.AnonymousAuthenticator
All Implemented Interfaces:
NuxeoAuthenticationPlugin, NuxeoAuthenticationPluginLogoutExtension

public class AnonymousAuthenticator
extends java.lang.Object
implements NuxeoAuthenticationPlugin, NuxeoAuthenticationPluginLogoutExtension

Author:
Thierry Delprat

Field Summary
static java.lang.String BLOCK_ANONYMOUS_LOGIN_KEY
           
 
Constructor Summary
AnonymousAuthenticator()
           
 
Method Summary
 java.util.List<java.lang.String> getUnAuthenticatedURLPrefix()
          Returns the list of prefix for unauthenticated URLs, typically the URLs associated to login prompt.
 java.lang.Boolean handleLoginPrompt(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, java.lang.String baseURL)
          Handles the Login Prompt.
 java.lang.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(java.util.Map<java.lang.String,java.lang.String> parameters)
          Initializes the Plugin from parameters set in the XML descriptor.
static boolean isAnonymousRequest(javax.servlet.http.HttpServletRequest httpRequest)
           
 java.lang.Boolean needLoginPrompt(javax.servlet.http.HttpServletRequest httpRequest)
          Defines if the authentication plugin needs to do a login prompt.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BLOCK_ANONYMOUS_LOGIN_KEY

public static final java.lang.String BLOCK_ANONYMOUS_LOGIN_KEY
See Also:
Constant Field Values
Constructor Detail

AnonymousAuthenticator

public AnonymousAuthenticator()
Method Detail

isAnonymousRequest

public static boolean isAnonymousRequest(javax.servlet.http.HttpServletRequest httpRequest)

handleRetrieveIdentity

public UserIdentificationInfo handleRetrieveIdentity(javax.servlet.http.HttpServletRequest httpRequest,
                                                     javax.servlet.http.HttpServletResponse httpResponse)
Description copied from interface: NuxeoAuthenticationPlugin
Retrieves user identification information from the request.

Specified by:
handleRetrieveIdentity in interface NuxeoAuthenticationPlugin
Returns:
UserIdentificationInfo

initPlugin

public void initPlugin(java.util.Map<java.lang.String,java.lang.String> parameters)
Description copied from interface: NuxeoAuthenticationPlugin
Initializes the Plugin from parameters set in the XML descriptor.

Specified by:
initPlugin in interface NuxeoAuthenticationPlugin

needLoginPrompt

public java.lang.Boolean needLoginPrompt(javax.servlet.http.HttpServletRequest httpRequest)
Description copied from interface: NuxeoAuthenticationPlugin
Defines if the authentication plugin needs to do a login prompt.

Specified by:
needLoginPrompt in interface NuxeoAuthenticationPlugin
Returns:
true if LoginPrompt is used

getUnAuthenticatedURLPrefix

public java.util.List<java.lang.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 interface NuxeoAuthenticationPlugin
Returns:

handleLoginPrompt

public java.lang.Boolean handleLoginPrompt(javax.servlet.http.HttpServletRequest httpRequest,
                                           javax.servlet.http.HttpServletResponse httpResponse,
                                           java.lang.String baseURL)
Description copied from interface: NuxeoAuthenticationPlugin
Handles the Login Prompt.

Specified by:
handleLoginPrompt in interface NuxeoAuthenticationPlugin
Parameters:
httpRequest - the request
httpResponse - the response
Returns:
true if AuthFilter must stop execution (ie: login prompt generated a redirect), false otherwise

handleLogout

public java.lang.Boolean handleLogout(javax.servlet.http.HttpServletRequest httpRequest,
                                      javax.servlet.http.HttpServletResponse httpResponse)
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 interface NuxeoAuthenticationPluginLogoutExtension
Returns:
true if caller must stop execution (ie: logout generated a redirect), false otherwise

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.