Class DatarouterUserSessionService

java.lang.Object
io.datarouter.auth.service.DatarouterUserSessionService
All Implemented Interfaces:
io.datarouter.web.user.session.service.UserSessionService

@Singleton
public class DatarouterUserSessionService
extends Object
implements io.datarouter.web.user.session.service.UserSessionService
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.datarouter.web.user.session.service.UserSessionService

    io.datarouter.web.user.session.service.UserSessionService.NoOpUserSessionService
  • Constructor Summary

    Constructors
    Constructor Description
    DatarouterUserSessionService()  
  • Method Summary

    Modifier and Type Method Description
    void clearSessionCookies​(javax.servlet.http.HttpServletResponse response)  
    io.datarouter.web.user.session.service.SessionBasedUser createAuthorizedUser​(String username, String description, Set<io.datarouter.web.user.session.service.Role> roles)  
    void deleteSession​(javax.servlet.http.HttpServletRequest request)  
    void deleteUserSessions​(List<String> usernames)  
    Optional<ZoneId> getZoneId​(String username)  
    void setSessionCookies​(javax.servlet.http.HttpServletResponse response, io.datarouter.web.user.session.service.Session session)  
    Optional<io.datarouter.web.user.session.service.Session> signInUserWithRoles​(javax.servlet.http.HttpServletRequest request, String username, Set<io.datarouter.web.user.session.service.Role> roles)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.datarouter.web.user.session.service.UserSessionService

    signInUser, signInUserWithCreateIfNecessary
  • Constructor Details

    • DatarouterUserSessionService

      public DatarouterUserSessionService()
  • Method Details

    • setSessionCookies

      public void setSessionCookies​(javax.servlet.http.HttpServletResponse response, io.datarouter.web.user.session.service.Session session)
      Specified by:
      setSessionCookies in interface io.datarouter.web.user.session.service.UserSessionService
    • clearSessionCookies

      public void clearSessionCookies​(javax.servlet.http.HttpServletResponse response)
      Specified by:
      clearSessionCookies in interface io.datarouter.web.user.session.service.UserSessionService
    • signInUserWithRoles

      public Optional<io.datarouter.web.user.session.service.Session> signInUserWithRoles​(javax.servlet.http.HttpServletRequest request, String username, Set<io.datarouter.web.user.session.service.Role> roles)
      Specified by:
      signInUserWithRoles in interface io.datarouter.web.user.session.service.UserSessionService
    • createAuthorizedUser

      public io.datarouter.web.user.session.service.SessionBasedUser createAuthorizedUser​(String username, String description, Set<io.datarouter.web.user.session.service.Role> roles)
      Specified by:
      createAuthorizedUser in interface io.datarouter.web.user.session.service.UserSessionService
    • deleteSession

      public void deleteSession​(javax.servlet.http.HttpServletRequest request)
      Specified by:
      deleteSession in interface io.datarouter.web.user.session.service.UserSessionService
    • deleteUserSessions

      public void deleteUserSessions​(List<String> usernames)
      Specified by:
      deleteUserSessions in interface io.datarouter.web.user.session.service.UserSessionService
    • getZoneId

      public Optional<ZoneId> getZoneId​(String username)
      Specified by:
      getZoneId in interface io.datarouter.web.user.session.service.UserSessionService