Class Session

java.lang.Object
com.linecorp.centraldogma.server.auth.Session

public final class Session extends Object
An authenticated session which can be replicated to the other Central Dogma replicas as a serialized form.
  • Constructor Details

    • Session

      public Session(String id, String username, Duration sessionValidDuration)
      Creates a new Session instance.
      Parameters:
      id - the session ID
      username - the name of the user which belongs to this session
      sessionValidDuration - the Duration that this session is valid
    • Session

      public Session(String id, String username, Instant creationTime, Instant expirationTime, @Nullable Serializable rawSession)
      Creates a new Session instance.
      Parameters:
      id - the session ID
      username - the name of the user which belongs to this session
      creationTime - the created time Instant
      expirationTime - the time Instant that this session is to be expired at
      rawSession - the serializable session object which is specific to authentication provider
  • Method Details

    • id

      public String id()
      Returns the session ID.
    • username

      public String username()
      Returns the name of the user which belongs to this session.
    • creationTime

      public Instant creationTime()
      Returns the created time Instant.
    • expirationTime

      public Instant expirationTime()
      Returns the time Instant that this session is to be expired at.
    • rawSession

      @Nullable public Serializable rawSession()
      Returns a raw session instance.
    • toString

      public String toString()
      Overrides:
      toString in class Object