org.apache.cocoon.webapps.authentication
Interface AuthenticationManager

All Known Implementing Classes:
DefaultAuthenticationManager

public interface AuthenticationManager

This is the authentication manager. It is used to authenticate (login, logout) a user. Usually, this component should not be used from custom code. The provided actions perform all required tasks.

Version:
CVS $Id: AuthenticationManager.java 53740 2004-10-04 19:20:08Z vgritsenko $
Author:
Carsten Ziegeler

Field Summary
static String ROLE
          The Avalon Role
 
Method Summary
 boolean checkAuthentication(Redirector redirector, String handlerName, String applicationName)
          Is the current user authenticated for the given handler?
 SessionContext createApplicationContext(String name, String loadURI, String saveURI)
          Create Application Context.
 RequestState getState()
          Get the current state of authentication
 UserHandler isAuthenticated(String handlerName)
          Is the current user authenticated for the given handler?
 UserHandler login(String handlerName, String applicationName, SourceParameters parameters)
          Try to login the user.
 void logout(String handlerName, int mode)
          Perform a logout of the user.
 

Field Detail

ROLE

public static final String ROLE
The Avalon Role

Method Detail

isAuthenticated

public UserHandler isAuthenticated(String handlerName)
                            throws ProcessingException
Is the current user authenticated for the given handler?

Returns:
Returns the corresponding handler if the user is authenticated.
Throws:
ProcessingException

checkAuthentication

public boolean checkAuthentication(Redirector redirector,
                                   String handlerName,
                                   String applicationName)
                            throws ProcessingException,
                                   IOException
Is the current user authenticated for the given handler? If the user is already authenticated, the RequestState is updated to the provided information (handler and application).

Throws:
ProcessingException
IOException

login

public UserHandler login(String handlerName,
                         String applicationName,
                         SourceParameters parameters)
                  throws ProcessingException
Try to login the user. If the authentication is successful, the user handler is returned. If not, null is returned.

Throws:
ProcessingException

logout

public void logout(String handlerName,
                   int mode)
            throws ProcessingException
Perform a logout of the user.

Throws:
ProcessingException

getState

public RequestState getState()
Get the current state of authentication


createApplicationContext

public SessionContext createApplicationContext(String name,
                                               String loadURI,
                                               String saveURI)
                                        throws ProcessingException
Create Application Context. This context is destroyed when the user logs out of the handler

Throws:
ProcessingException


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.