Class DefaultSessionService
java.lang.Object
dev.getelements.elements.service.auth.DefaultSessionService
- All Implemented Interfaces:
SessionService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
blacklistSession
(String userId, String sessionSecret) Blacklists theSession
instance currently in-use for the specific user id as returned byUser.getId()
checkAndRefreshSessionIfNecessary
(String sessionSecret) Finds an instance ofSession
based on the id, as determined bySessionCreation.getSessionSecret()
.long
void
setSessionDao
(SessionDao sessionDao) void
setSessionTimeoutSeconds
(long sessionTimeoutSeconds)
-
Constructor Details
-
DefaultSessionService
public DefaultSessionService()
-
-
Method Details
-
checkAndRefreshSessionIfNecessary
Description copied from interface:SessionService
Finds an instance ofSession
based on the id, as determined bySessionCreation.getSessionSecret()
. In addition to performing a check for a validSession
, this will reset the expiry of theSession
.- Specified by:
checkAndRefreshSessionIfNecessary
in interfaceSessionService
- Parameters:
sessionSecret
- theSession
identifier- Returns:
- the
Session
, never null. Throws the appropriate exception if session isn't found.
-
blacklistSession
Description copied from interface:SessionService
Blacklists theSession
instance currently in-use for the specific user id as returned byUser.getId()
- Specified by:
blacklistSession
in interfaceSessionService
- Parameters:
userId
- the user issessionSecret
- the session secret
-
getSessionDao
-
setSessionDao
-
getSessionTimeoutSeconds
public long getSessionTimeoutSeconds() -
setSessionTimeoutSeconds
@Inject public void setSessionTimeoutSeconds(@Named("dev.getelements.elements.session.timeout.seconds") long sessionTimeoutSeconds)
-