com.uwyn.rife.authentication
Class AuthenticationUtils

java.lang.Object
  extended by com.uwyn.rife.authentication.AuthenticationUtils

public abstract class AuthenticationUtils
extends Object

This abstract class provides convenience shortcut methods to perform common operations with the authentication framework

Since:
1.4
Version:
$Revision: 3643 $
Author:
Geert Bevin (gbevin[remove] at uwyn dot com)

Constructor Summary
AuthenticationUtils()
           
 
Method Summary
static String startAuthenticationSession(ElementInfo authElementInfo, long userId, String hostIp, boolean remembered)
          Starts a new authentication session for a particular user and Authenticated element in a site.
static String startAuthenticationSession(Site site, String authElementId, ElementInfo reference, long userId, String hostIp, boolean remembered)
          Starts a new authentication session for a particular user and Authenticated element in a site.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthenticationUtils

public AuthenticationUtils()
Method Detail

startAuthenticationSession

public static String startAuthenticationSession(Site site,
                                                String authElementId,
                                                ElementInfo reference,
                                                long userId,
                                                String hostIp,
                                                boolean remembered)
                                         throws AuthenticatedElementNotFoundException,
                                                NotAuthenticatedElementException,
                                                SessionManagerException
Starts a new authentication session for a particular user and Authenticated element in a site.

Parameters:
site - the site in which the authenticated element is declared
authElementId - the absolute ID of the authenticated element that provides all the authentication related managers
reference - a reference element against which to resolve the id; or null if the provided id is absolute
userId - The id that uniquely identifies the user that is allowed to use this session.
hostIp - The ip address of the host from which the user accesses the application.
remembered - Indicates whether the session is started through remember me or from scratch.
Returns:
A String that uniquely identifies the authentication session that was just started.
Throws:
AuthenticatedElementNotFoundException - when the element ID couldn't be found in the site
NotAuthenticatedElementException - when the element ID doesn't refer to an Authenticated element
SessionManagerException - when an error occurred while startin the authentication session in a manager
Since:
1.4

startAuthenticationSession

public static String startAuthenticationSession(ElementInfo authElementInfo,
                                                long userId,
                                                String hostIp,
                                                boolean remembered)
                                         throws AuthenticatedElementNotFoundException,
                                                NotAuthenticatedElementException,
                                                SessionManagerException
Starts a new authentication session for a particular user and Authenticated element in a site.

Parameters:
authElementInfo - the ElementInfo of the authenticated element that provides all the authentication related managers
userId - The id that uniquely identifies the user that is allowed to use this session.
hostIp - The ip address of the host from which the user accesses the application.
remembered - Indicates whether the session is started through remember me or from scratch.
Returns:
A String that uniquely identifies the authentication session that was just started.
Throws:
AuthenticatedElementNotFoundException - when the element ID couldn't be found in the site
NotAuthenticatedElementException - when the element ID doesn't refer to an Authenticated element
SessionManagerException - when an error occurred while startin the authentication session in a manager
Since:
1.4


Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.