Package io.datarouter.auth.service
Class DatarouterCurrentSessionInfo
java.lang.Object
io.datarouter.auth.service.DatarouterCurrentSessionInfo
- All Implemented Interfaces:
io.datarouter.web.user.session.CurrentSessionInfo
@Singleton public class DatarouterCurrentSessionInfo extends Object implements io.datarouter.web.user.session.CurrentSessionInfo
Implementation of
CurrentSessionInfo.
Having a Session set as an ServletRequest attribute using
DatarouterSessionManager (usually by DatarouterAuthenticationFilter) is a prerequisite for
CurrentSessionInfo functionality.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.datarouter.web.user.session.CurrentSessionInfo
io.datarouter.web.user.session.CurrentSessionInfo.NoOpCurrentSessionInfo -
Constructor Summary
Constructors Constructor Description DatarouterCurrentSessionInfo() -
Method Summary
Modifier and Type Method Description Set<io.datarouter.web.user.session.service.Role>getRoles(javax.servlet.ServletRequest request)Optional<io.datarouter.web.user.session.DatarouterSession>getSession(javax.servlet.ServletRequest request)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.datarouter.web.user.session.CurrentSessionInfo
findNonEmptyUsername, getNonEmptyUsernameOrElse, getRequiredSession, hasAnyRole, hasAnyRoleEnum, hasRole, hasRole
-
Constructor Details
-
DatarouterCurrentSessionInfo
public DatarouterCurrentSessionInfo()
-
-
Method Details
-
getSession
public Optional<io.datarouter.web.user.session.DatarouterSession> getSession(javax.servlet.ServletRequest request)- Specified by:
getSessionin interfaceio.datarouter.web.user.session.CurrentSessionInfo
-
getRoles
public Set<io.datarouter.web.user.session.service.Role> getRoles(javax.servlet.ServletRequest request)- Specified by:
getRolesin interfaceio.datarouter.web.user.session.CurrentSessionInfo
-