Package lumis.portal.authentication
Interface IAuthenticationManager
-
- All Known Implementing Classes:
AuthenticationManager
@StableMinor(version="14.2", sinceVersion="4.0") public interface IAuthenticationManager
This interface offers methods for authentication operations.- Since:
- 4.0.0
- Version:
- $Revision: 24985 $ $Date: 2022-05-02 23:04:30 -0300 (Mon, 02 May 2022) $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
clearInactiveSessions(SessionConfig sessionConfig, int minutes, ITransaction transaction)
Deprecated.since 12.1.0 removed from stable API without replacement.void
endImpersonation(SessionConfig sessionConfig)
Ends an impersonation in the current thread, that has been started byimpersonate(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 bySessionConfig.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 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.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.String
loginFramworkClockUser(ITransaction transaction)
Deprecated.Since 4.0.8, instead of calling this method generate a impersonated SessionConfig by callingimpersonate(String)
usingUserConfig.USER_FRAMEWORKCLOCK_ID
as parameter.String
loginUser(String login, String password, ITransaction transaction)
Deprecated.Since 4.0.8, this method has been replaced bylogin(String, String, ITransaction)
.SessionConfig
loginUser(String userId, ITransaction transaction)
Logins a user without performing any authentication.String
loginUserGuest()
Deprecated.Since 4.0.8, instead of calling this method generate a impersonated SessionConfig by callingimpersonate(String)
usingUserConfig.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
@Deprecated String getUserIdBySessionId(SessionConfig sessionConfig, ITransaction transaction) throws ManagerException, PortalException
Deprecated.Since 4.0.8, this method was replaced bySessionConfig.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 bylogin(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 callingimpersonate(String)
usingUserConfig.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
@Deprecated void clearInactiveSessions(SessionConfig sessionConfig, int minutes, ITransaction transaction) throws ManagerException, PortalException
Deprecated.since 12.1.0 removed from stable API without replacement.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 callingimpersonate(String)
usingUserConfig.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. CallendImpersonation(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 byimpersonate(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
-
-