com.anwrt.anycontent.plugins.core.authentication
Class CASUserAuthenticationManager

java.lang.Object
  extended bycom.anwrt.anycontent.authentication.AuthenticationManager
      extended bycom.anwrt.anycontent.plugins.core.authentication.CASUserAuthenticationManager

public class CASUserAuthenticationManager
extends AuthenticationManager

This manager gets the credentials given by an authentification CAS filter.
The filter must set the 'remote user' header into the request.

This manager can not get the password of the connected user: the user is already authentified. This manager should not be associated with an AuthenticableBaseUser


Constructor Summary
CASUserAuthenticationManager()
           
 
Method Summary
 boolean accept(Request request)
          Mathod called by AuthenticateAction before asking for credentials.
 void allowed(Request request, Response response, Redirector redirector)
          Mathod called by AuthenticateAction after authentication process succeeded
 void configure(Configuration configuration)
          Configuration of this AuthenticationManager.
 Credentials getCredentials(java.util.Map objectModel, Redirector redirector)
          Method called by AuthenticateAction each time a request need authentication.
 void notAllowed(Request request, Response response, Redirector redirector)
          Method called by AuthenticateAction each a user could not get authenticated.
 boolean validate(java.util.Map objectModel, Redirector redirector)
          Validates this AuthenticationManager.
 
Methods inherited from class com.anwrt.anycontent.authentication.AuthenticationManager
redirect
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CASUserAuthenticationManager

public CASUserAuthenticationManager()
Method Detail

configure

public void configure(Configuration configuration)
               throws ConfigurationException
Description copied from class: AuthenticationManager
Configuration of this AuthenticationManager.
This method is called at init time by the system.

Specified by:
configure in class AuthenticationManager
Parameters:
configuration - the Configuration persisted in the WEB-INF/config/authentication.xml file
Throws:
ConfigurationException

validate

public boolean validate(java.util.Map objectModel,
                        Redirector redirector)
                 throws java.lang.Exception
Description copied from class: AuthenticationManager
Validates this AuthenticationManager. It may declares itself as invalid, due to some environment status.
In this cas, the whole authentication process is restarted.

Specified by:
validate in class AuthenticationManager
Parameters:
objectModel - the cocoon object model.
redirector - the cocoon Redirector that can be used for redirecting response.
Returns:
true if this AuthenticationManager was in a valid state, false otherwise
Throws:
java.lang.Exception - if something wrong occurs

accept

public boolean accept(Request request)
Description copied from class: AuthenticationManager
Mathod called by AuthenticateAction before asking for credentials. This method is used to bypass authentication. If this method returns true, no authentication will be require. Use it with care, as it may lead to obvious security issues.

Specified by:
accept in class AuthenticationManager
Parameters:
request - the current Request
Returns:
true if the Request is not authenticated

getCredentials

public Credentials getCredentials(java.util.Map objectModel,
                                  Redirector redirector)
                           throws java.lang.Exception
Description copied from class: AuthenticationManager
Method called by AuthenticateAction each time a request need authentication.

Specified by:
getCredentials in class AuthenticationManager
Parameters:
objectModel - the cocoon object model.
redirector - the cocoon redirector.
Returns:
the UserPrincipal corresponding to the user, or null if user could not get authenticated.
Throws:
java.lang.Exception - if something wrong occurs

notAllowed

public void notAllowed(Request request,
                       Response response,
                       Redirector redirector)
                throws java.lang.Exception
Description copied from class: AuthenticationManager
Method called by AuthenticateAction each a user could not get authenticated. This method implementation is responsible of redirecting response to appropriate url.

Specified by:
notAllowed in class AuthenticationManager
Parameters:
request - the HttpRequest.
response - the HttpResponse.
redirector - the cocoon Redirector that can be used for redirecting response.
Throws:
java.lang.Exception - if something wrong occurs

allowed

public void allowed(Request request,
                    Response response,
                    Redirector redirector)
Description copied from class: AuthenticationManager
Mathod called by AuthenticateAction after authentication process succeeded

Specified by:
allowed in class AuthenticationManager
Parameters:
request - the HttpRequest.
response - the HttpResponse.
redirector - the cocoon Redirector that can be used for redirecting response.


Copyright © 2006 Anyware Technologies. All Rights Reserved.