Class DefaultSessionService
java.lang.Object
dev.getelements.elements.service.auth.DefaultSessionService
- All Implemented Interfaces:
SessionService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidblacklistSession(String userId, String sessionSecret) Blacklists theSessioninstance currently in-use for the specific user id as returned byUser.getId()checkAndRefreshSessionIfNecessary(String sessionSecret) Finds an instance ofSessionbased on the id, as determined bySessionCreation.getSessionSecret().longvoidsetSessionDao(SessionDao sessionDao) voidsetSessionTimeoutSeconds(long sessionTimeoutSeconds)
-
Constructor Details
-
DefaultSessionService
public DefaultSessionService()
-
-
Method Details
-
checkAndRefreshSessionIfNecessary
Description copied from interface:SessionServiceFinds an instance ofSessionbased 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:
checkAndRefreshSessionIfNecessaryin interfaceSessionService- Parameters:
sessionSecret- theSessionidentifier- Returns:
- the
Session, never null. Throws the appropriate exception if session isn't found.
-
blacklistSession
Description copied from interface:SessionServiceBlacklists theSessioninstance currently in-use for the specific user id as returned byUser.getId()- Specified by:
blacklistSessionin 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)
-