lumis.portal.authentication
Interface IAuthenticationManager

Package class diagram package IAuthenticationManager
All Known Implementing Classes:
AuthenticationManager

@StableMinor(version="6.2",
             sinceVersion="4.0")
public interface IAuthenticationManager

This interface offers methods for authentication operations.

Since:
4.0.0

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 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. Since 4.0.8, this method was replaced by SessionConfig.getUserId().
 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. Since 4.0.8, instead of calling this method generate a impersonated SessionConfig by calling impersonate(String) using UserConfig.USER_FRAMEWORKCLOCK_ID as parameter.
 SessionConfig loginUser(String userId, ITransaction transaction)
          Logins a user without performing any authentication.
 String loginUser(String login, String password, ITransaction transaction)
          Deprecated. Since 4.0.8, this method has been replaced by login(String, String, ITransaction).
 String loginUserGuest()
          Deprecated. Since 4.0.8, instead of calling this method generate a impersonated SessionConfig by calling impersonate(String) using UserConfig.USER_GUEST_ID as parameter.
 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.
 

Method Detail

validateSessionId

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

Parameters:
sessionConfig -
transaction -
Returns:
true if the Session is valis and false otherwise.
Throws:
ManagerException
PortalException

getUserIdBySessionId

String getUserIdBySessionId(SessionConfig sessionConfig,
                            ITransaction transaction)
                            throws ManagerException,
                                   PortalException
Deprecated. Since 4.0.8, this method was replaced by SessionConfig.getUserId().

Return the id of the user given the userSession.

Parameters:
sessionConfig -
transaction -
Returns:
a String.
Throws:
ManagerException
PortalException

loginUser

@Deprecated
String loginUser(String login,
                            String password,
                            ITransaction transaction)
                 throws ManagerException,
                        PortalException
Deprecated. Since 4.0.8, this method has been replaced by login(String, String, ITransaction).

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.

Parameters:
login -
password -
transaction -
Returns:
a String.
Throws:
ManagerException
PortalException

login

SessionConfig login(String login,
                    String password,
                    ITransaction transaction)
                    throws PortalException
Logins a user using the specified password as his credentials, and returns the new SessionConfig for the logged in user.

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
Since:
4.0.8
See Also:
loginUser(String, ITransaction)

login

SessionConfig login(String securityAlias,
                    String login,
                    String password,
                    ITransaction transaction)
                    throws PortalException
Logins a user using the specified JAAS security alias, password as his credentials, and returns the new SessionConfig for the logged in user.

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
Since:
4.1.0
See Also:
loginUser(String, ITransaction)

loginUser

SessionConfig loginUser(String userId,
                        ITransaction transaction)
                        throws PortalException
Logins a user without performing any authentication.

Parameters:
userId - the userId.
transaction - the transaction for persistence access.
Throws:
PortalException
Since:
4.0.8

loginUserGuest

@Deprecated
String loginUserGuest()
                      throws ManagerException,
                             PortalException
Deprecated. Since 4.0.8, instead of calling this method generate a impersonated SessionConfig by calling impersonate(String) using UserConfig.USER_GUEST_ID as parameter.

Add a guest session. This method returns the user's session configuration.

Returns:
Returns a String.
Throws:
ManagerException
PortalException

logoutUser

void logoutUser(SessionConfig sessionConfig,
                ITransaction transaction)
                throws ManagerException,
                       PortalException
Close the user's session given the userSession and the transaction.

Parameters:
sessionConfig -
transaction -
Throws:
ManagerException
PortalException

clearInactiveSessions

void clearInactiveSessions(SessionConfig sessionConfig,
                           int minutes,
                           ITransaction transaction)
                           throws ManagerException,
                                  PortalException
Deletes the sessions inactive for the specified amount of minutes.

Parameters:
sessionConfig -
minutes -
transaction -
Throws:
ManagerException
PortalException

loginFramworkClockUser

@Deprecated
String loginFramworkClockUser(ITransaction transaction)
                              throws ManagerException,
                                     PortalException
Deprecated. Since 4.0.8, instead of calling this method generate a impersonated SessionConfig by calling impersonate(String) using UserConfig.USER_FRAMEWORKCLOCK_ID as parameter.

Creates a session for the FrameworkClock user.

Parameters:
transaction -
Returns:
Throws:
ManagerException
PortalException

keepSessionAlive

void keepSessionAlive(SessionConfig sessionConfig)
                      throws ManagerException,
                             PortalException
Keeps the specified session alive by updating the last time the session was used.

Parameters:
sessionConfig -
Throws:
ManagerException
PortalException
Since:
4.0.3

impersonate

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

Parameters:
userId - the user id.
Returns:
the impersonated SessionConfig.
Throws:
PortalException
Since:
4.0.8

endImpersonation

void endImpersonation(SessionConfig sessionConfig)
                      throws PortalException
Ends an impersonation in the current thread, that has been started by impersonate(String).

Parameters:
sessionConfig - the impersonated session config.
Throws:
IllegalArgumentException - if sessionConfig is not the current impersonated SessionConfig instance.
PortalException
Since:
4.0.8

getSessionsByUserId

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

Parameters:
sessionConfig -
userId -
transaction -
Returns:
Throws:
PortalException
Since:
4.0.11


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.