Package lumis.portal.authentication
Interface IAuthenticationDao
-
- All Known Implementing Classes:
AuthenticationDaoJdbc
public interface IAuthenticationDao
This interface defines authentication related operations.- Since:
- 4.0.0
- Version:
- $Revision: 7370 $ $Date: 2007-06-12 13:50:49 -0300 (Tue, 12 Jun 2007) $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addUserSessionId(java.lang.String userSessionId, java.lang.String userId)
Add the User Session Id.java.util.Collection<SessionConfig>
clearInactiveSessions(int minutes, ITransaction transaction)
Remove sessions inactive for the specified amount of minutes.void
deleteUserSessionByUserId(java.lang.String userId)
Delete the User Session Id from the user id.void
deleteUserSessionId(java.lang.String userSessionId)
Delete the User Session Id.java.util.Collection<SessionConfig>
getSessionsByUserId(java.lang.String userId, ITransaction transaction)
Returns a collection of active session objects for the given user.java.lang.String
getUserId(java.lang.String userSessionId, ITransaction transaction)
Get the user id.void
keepSessionAlive(java.lang.String sessionId)
Update the last access date for the given session.boolean
validateUserLogin(java.lang.String login, java.lang.String password, ITransaction transaction)
Validade the user login.java.lang.String
validateUserSession(java.lang.String userSessionId, ITransaction transaction)
Validate the session of the user.
-
-
-
Method Detail
-
addUserSessionId
void addUserSessionId(java.lang.String userSessionId, java.lang.String userId) throws DaoException, PortalException
Add the User Session Id.- Parameters:
userSessionId
-userId
-- Throws:
DaoException
PortalException
-
deleteUserSessionId
void deleteUserSessionId(java.lang.String userSessionId) throws DaoException, PortalException
Delete the User Session Id.- Parameters:
userSessionId
-- Throws:
DaoException
PortalException
-
deleteUserSessionByUserId
void deleteUserSessionByUserId(java.lang.String userId) throws DaoException, PortalException
Delete the User Session Id from the user id.- Parameters:
userId
-- Throws:
DaoException
PortalException
-
validateUserSession
java.lang.String validateUserSession(java.lang.String userSessionId, ITransaction transaction) throws DaoException, PortalException
Validate the session of the user.- Parameters:
userSessionId
- the user session id.transaction
- the transaction for persistence access.- Returns:
- the userId if the user's session is valid, or null if it is not valid.
- Throws:
DaoException
PortalException
-
getUserId
java.lang.String getUserId(java.lang.String userSessionId, ITransaction transaction) throws DaoException, PortalException
Get the user id.- Parameters:
userSessionId
-transaction
-- Returns:
- a String.
- Throws:
DaoException
PortalException
-
validateUserLogin
boolean validateUserLogin(java.lang.String login, java.lang.String password, ITransaction transaction) throws DaoException, PortalException
Validade the user login.- Parameters:
login
-password
-transaction
-- Returns:
- true if the User's login is valid and false otherwise.
- Throws:
DaoException
PortalException
-
keepSessionAlive
void keepSessionAlive(java.lang.String sessionId) throws PortalException
Update the last access date for the given session.- Parameters:
sessionId
-- Throws:
DaoException
PortalException
-
clearInactiveSessions
java.util.Collection<SessionConfig> clearInactiveSessions(int minutes, ITransaction transaction) throws DaoException, PortalException
Remove sessions inactive for the specified amount of minutes.- Parameters:
minutes
- amount of minutes.transaction
- transaction for persistence access.- Returns:
- the sessions cleared.
- Throws:
DaoException
PortalException
-
getSessionsByUserId
java.util.Collection<SessionConfig> getSessionsByUserId(java.lang.String userId, ITransaction transaction) throws PortalException
Returns a collection of active session objects for the given user.- Parameters:
userId
-transaction
-- Returns:
- Throws:
PortalException
- Since:
- 4.0.11
-
-