lumis.portal.authentication
Class AuthenticationManager

Package class diagram package AuthenticationManager
java.lang.Object
  extended by lumis.portal.authentication.AuthenticationManager
All Implemented Interfaces:
IAuthenticationManager

public class AuthenticationManager
extends Object
implements IAuthenticationManager

Manager responsible for authenticating users and keeping session information.

Since:
4.0.0

Constructor Summary
AuthenticationManager()
           
 
Method Summary
 void clearInactiveSessions(SessionConfig sessionConfig, int minutes, ITransaction transaction)
          Deletes the sessions inactive for the specified amount of minutes.
 void endImpersonation(SessionConfig sessionConfig)
          Ends an impersonation in the current thread, that has been started by IAuthenticationManager.impersonate(String).
 Collection<SessionConfig> getSessionsByUserId(SessionConfig sessionConfig, String userId, ITransaction transaction)
          Returns a collection of active session objects for the given user.
 String getUserIdBySessionId(SessionConfig sessionConfig, ITransaction transaction)
          Deprecated. 
 SessionConfig impersonate(String userId)
          The authenticated user in the current thread impersonates another user.
 void keepSessionAlive(SessionConfig sessionConfig)
          Keeps the specified session alive by updating the last time the session was used.
 SessionConfig login(String login, String password, ITransaction transaction)
          Logins a user using the specified password as his credentials, and returns the new SessionConfig for the logged in user.
 SessionConfig login(String securityAlias, String login, String password, ITransaction transaction)
          Logins a user using the specified JAAS security alias, password as his credentials, and returns the new SessionConfig for the logged in user.
 String loginFramworkClockUser(ITransaction transaction)
          Deprecated. 
 SessionConfig loginUser(String userId, ITransaction transaction)
          Logins a user without performing any authentication.
 String loginUser(String login, String password, ITransaction transaction)
          Deprecated. 
 String loginUserGuest()
          Deprecated. 
 void logoutUser(SessionConfig sessionConfig, ITransaction transaction)
          Close the user's session given the userSession and the transaction.
 boolean validateSessionId(SessionConfig sessionConfig, ITransaction transaction)
          Validate the session of the User given the userSession and transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthenticationManager

public AuthenticationManager()
Method Detail

validateSessionId

public boolean validateSessionId(SessionConfig sessionConfig,
                                 ITransaction transaction)
                          throws ManagerException,
                                 PortalException
Description copied from interface: IAuthenticationManager
Validate the session of the User given the userSession and transaction. This method returns a boolean variable with True or False value

Specified by:
validateSessionId in interface IAuthenticationManager
Returns:
true if the Session is valis and false otherwise.
Throws:
ManagerException
PortalException

getUserIdBySessionId

@Deprecated
public String getUserIdBySessionId(SessionConfig sessionConfig,
                                              ITransaction transaction)
                            throws ManagerException,
                                   PortalException
Deprecated. 

Description copied from interface: IAuthenticationManager
Return the id of the user given the userSession.

Specified by:
getUserIdBySessionId in interface IAuthenticationManager
Returns:
a String.
Throws:
ManagerException
PortalException

loginFramworkClockUser

@Deprecated
public String loginFramworkClockUser(ITransaction transaction)
                              throws ManagerException,
                                     PortalException
Deprecated. 

Description copied from interface: IAuthenticationManager
Creates a session for the FrameworkClock user.

Specified by:
loginFramworkClockUser in interface IAuthenticationManager
Returns:
Throws:
ManagerException
PortalException

loginUser

@Deprecated
public String loginUser(String login,
                                   String password,
                                   ITransaction transaction)
                 throws ManagerException,
                        PortalException
Deprecated. 

Description copied from interface: IAuthenticationManager
Start the user's session given the login and password. This method returns the user's session configuration. Framework users like LumisFrameworkClockUser and LumisPageCacheUser cannot be authenticated through this method.

Specified by:
loginUser in interface IAuthenticationManager
Returns:
a String.
Throws:
ManagerException
PortalException

login

public SessionConfig login(String login,
                           String password,
                           ITransaction transaction)
                    throws ManagerException,
                           PortalException
Description copied from interface: IAuthenticationManager
Logins a user using the specified password as his credentials, and returns the new SessionConfig for the logged in user.

Specified by:
login in interface IAuthenticationManager
Parameters:
login - the user's login.
password - the user's password.
transaction - the transaction for persistence access.
Returns:
the created SessionConfig, or null if the login operation could not authenticate the user.
Throws:
PortalException
ManagerException
See Also:
IAuthenticationManager.loginUser(String, ITransaction)

login

public SessionConfig login(String securityAlias,
                           String login,
                           String password,
                           ITransaction transaction)
                    throws ManagerException,
                           PortalException
Description copied from interface: IAuthenticationManager
Logins a user using the specified JAAS security alias, password as his credentials, and returns the new SessionConfig for the logged in user.

Specified by:
login in interface IAuthenticationManager
Parameters:
securityAlias - the JAAS security alias to use. If null, the default security alias specified in the lumisportalconfig.xml file is used.
login - the user's login.
password - the user's password.
transaction - the transaction for persistence access.
Returns:
the created SessionConfig, or null if the login operation could not authenticate the user.
Throws:
PortalException
ManagerException
See Also:
IAuthenticationManager.loginUser(String, ITransaction)

loginUser

public SessionConfig loginUser(String userId,
                               ITransaction transaction)
                        throws PortalException
Description copied from interface: IAuthenticationManager
Logins a user without performing any authentication.

Specified by:
loginUser in interface IAuthenticationManager
Parameters:
userId - the userId.
transaction - the transaction for persistence access.
Throws:
PortalException

logoutUser

public void logoutUser(SessionConfig sessionConfig,
                       ITransaction transaction)
                throws ManagerException,
                       PortalException
Description copied from interface: IAuthenticationManager
Close the user's session given the userSession and the transaction.

Specified by:
logoutUser in interface IAuthenticationManager
Throws:
ManagerException
PortalException

loginUserGuest

@Deprecated
public String loginUserGuest()
                      throws ManagerException,
                             PortalException
Deprecated. 

Description copied from interface: IAuthenticationManager
Add a guest session. This method returns the user's session configuration.

Specified by:
loginUserGuest in interface IAuthenticationManager
Returns:
Returns a String.
Throws:
ManagerException
PortalException

clearInactiveSessions

public void clearInactiveSessions(SessionConfig sessionConfig,
                                  int minutes,
                                  ITransaction transaction)
                           throws ManagerException,
                                  PortalException
Description copied from interface: IAuthenticationManager
Deletes the sessions inactive for the specified amount of minutes.

Specified by:
clearInactiveSessions in interface IAuthenticationManager
Throws:
ManagerException
PortalException

keepSessionAlive

public void keepSessionAlive(SessionConfig sessionConfig)
                      throws ManagerException,
                             PortalException
Description copied from interface: IAuthenticationManager
Keeps the specified session alive by updating the last time the session was used.

Specified by:
keepSessionAlive in interface IAuthenticationManager
Throws:
ManagerException
PortalException

impersonate

public SessionConfig impersonate(String userId)
                          throws PortalException
Description copied from interface: IAuthenticationManager
The authenticated user in the current thread impersonates another user. Call IAuthenticationManager.endImpersonation(SessionConfig) to end an impersonation initiated by this method.

Specified by:
impersonate in interface IAuthenticationManager
Parameters:
userId - the user id.
Returns:
the impersonated SessionConfig.
Throws:
PortalException

endImpersonation

public void endImpersonation(SessionConfig sessionConfig)
                      throws PortalException
Description copied from interface: IAuthenticationManager
Ends an impersonation in the current thread, that has been started by IAuthenticationManager.impersonate(String).

Specified by:
endImpersonation in interface IAuthenticationManager
Parameters:
sessionConfig - the impersonated session config.
Throws:
PortalException

getSessionsByUserId

public Collection<SessionConfig> getSessionsByUserId(SessionConfig sessionConfig,
                                                     String userId,
                                                     ITransaction transaction)
                                              throws PortalException
Description copied from interface: IAuthenticationManager
Returns a collection of active session objects for the given user. Guest and impersonated users are not considered active.

Specified by:
getSessionsByUserId in interface IAuthenticationManager
Returns:
Throws:
PortalException


Lumisportal  5.5.0.091130 - Copyright © 2001-2007, Lumis. All Rights Reserved.