Interface WingsSessionHelper

  • All Implemented Interfaces:

    
    public interface WingsSessionHelper
    
                        
    Since:

    2022-02-24

    Author:

    trydofor

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      long getUserId(@NotNull() Session session) Get the login UserId or DefaultUserId.
      boolean isExpired(@NotNull() Session session) Determine if ExpiredKey exists `true` value in `bool` or `String` type by default.
      SecurityContext getSecurityContext(@NotNull() Session session) Get the Spring SecurityContext within SPRING_SECURITY_CONTEXT_KEY by default.
      abstract List<MapSession> findByUserId(Long userId) Get all session of userId
      abstract boolean dropSession(String sessionId) Drop the session by sessionId
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getUserId

         long getUserId(@NotNull() Session session)

        Get the login UserId or DefaultUserId.Unknown

      • isExpired

         boolean isExpired(@NotNull() Session session)

        Determine if ExpiredKey exists `true` value in `bool` or `String` type by default.

      • getSecurityContext

        @Nullable() SecurityContext getSecurityContext(@NotNull() Session session)

        Get the Spring SecurityContext within SPRING_SECURITY_CONTEXT_KEY by default.

      • findByUserId

        @NotNull() abstract List<MapSession> findByUserId(Long userId)

        Get all session of userId

      • dropSession

         abstract boolean dropSession(String sessionId)

        Drop the session by sessionId