Class HumanSessionResponse

java.lang.Object
co.ankatech.keymanagement.client.auth.model.HumanSessionResponse

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class HumanSessionResponse extends Object
One live sign-in session of a person. A session begins at a sign-in, keeps its identifier across every refresh and tenant switch, and ends when it is revoked or logged out, when it stays inactive for longer than its inactivity window, or at its absolute expiry. No token is shown.
  • Field Details

  • Constructor Details

    • HumanSessionResponse

      public HumanSessionResponse()
  • Method Details

    • getIdpKindAsString

      public String getIdpKindAsString()
      The wire value of idpKind: what the server sent, verbatim.
      • For a value this release declares, the same wire value the enum names.
      • For a value it does not declare (one a later server added), the server's wire value verbatim, while getIdpKind() reads UNKNOWN_DEFAULT_OPEN_API; writing this model sends that wire value back, never the sentinel.
      • For an absent member, null.
      Returns:
      the wire value, or null when the member is absent
    • sessionId

      public HumanSessionResponse sessionId(@Nonnull UUID sessionId)
    • getSessionId

      @Nonnull public UUID getSessionId()
      The session's identifier. The access tokens of the session carry it as the `sid` claim.
      Returns:
      sessionId
    • setSessionId

      public void setSessionId(@Nonnull UUID sessionId)
    • tenantId

      public HumanSessionResponse tenantId(@Nonnull UUID tenantId)
    • getTenantId

      @Nonnull public UUID getTenantId()
      The tenant the session is currently in: the tenant of its last sign-in, tenant selection or tenant switch.
      Returns:
      tenantId
    • setTenantId

      public void setTenantId(@Nonnull UUID tenantId)
    • authTime

      public HumanSessionResponse authTime(@Nullable OffsetDateTime authTime)
    • getAuthTime

      @Nullable public OffsetDateTime getAuthTime()
      When the person authenticated (RFC 3339). A refresh or a tenant switch never changes it. Null when the authentication time is unknown: a session begun by a refresh token issued before the platform kept sessions.
      Returns:
      authTime
    • setAuthTime

      public void setAuthTime(@Nullable OffsetDateTime authTime)
    • authority

      public HumanSessionResponse authority(@Nullable String authority)
    • getAuthority

      @Nullable public String getAuthority()
      Who authenticated the person: `LOCAL` for a password sign-in to the platform, otherwise the identifier of the identity provider. In a tenant administrator's list it is null when the session was federated through an identity provider that is not one of the tenant's (neither the tenant's own provider nor the deployment's provider the tenant inherits), as when a session begun in another tenant switched into this one: the other tenant's provider is never shown.
      Returns:
      authority
    • setAuthority

      public void setAuthority(@Nullable String authority)
    • idpKind

      public HumanSessionResponse idpKind(@Nullable HumanSessionResponse.IdpKindEnum idpKind)
    • getIdpKind

      @Nullable public HumanSessionResponse.IdpKindEnum getIdpKind()
      The kind of the identity provider that authenticated the person. Null for a local sign-in, when the kind is unknown, or when `authority` is withheld.
      Returns:
      idpKind
    • setIdpKind

      public void setIdpKind(@Nullable HumanSessionResponse.IdpKindEnum idpKind)
    • methods

      public HumanSessionResponse methods(@Nonnull List<String> methods)
    • addMethodsItem

      public HumanSessionResponse addMethodsItem(String methodsItem)
    • getMethods

      @Nonnull public List<String> getMethods()
      The authentication method references of the sign-in (RFC 8176), as the session's access tokens carry them in `amr`: `pwd` for a password; what the identity provider asserted for a federated sign-in. Empty when none was asserted.
      Returns:
      methods
    • setMethods

      public void setMethods(@Nonnull List<String> methods)
    • createdAt

      public HumanSessionResponse createdAt(@Nonnull OffsetDateTime createdAt)
    • getCreatedAt

      @Nonnull public OffsetDateTime getCreatedAt()
      When the session began (RFC 3339).
      Returns:
      createdAt
    • setCreatedAt

      public void setCreatedAt(@Nonnull OffsetDateTime createdAt)
    • lastActivityAt

      public HumanSessionResponse lastActivityAt(@Nonnull OffsetDateTime lastActivityAt)
    • getLastActivityAt

      @Nonnull public OffsetDateTime getLastActivityAt()
      The session's last sign-in or refresh (RFC 3339).
      Returns:
      lastActivityAt
    • setLastActivityAt

      public void setLastActivityAt(@Nonnull OffsetDateTime lastActivityAt)
    • absoluteExpiresAt

      public HumanSessionResponse absoluteExpiresAt(@Nonnull OffsetDateTime absoluteExpiresAt)
    • getAbsoluteExpiresAt

      @Nonnull public OffsetDateTime getAbsoluteExpiresAt()
      The instant after which the session ends whatever its activity (RFC 3339): its beginning plus the configured absolute session lifetime. It never moves.
      Returns:
      absoluteExpiresAt
    • setAbsoluteExpiresAt

      public void setAbsoluteExpiresAt(@Nonnull OffsetDateTime absoluteExpiresAt)
    • rememberMe

      public HumanSessionResponse rememberMe(@Nonnull Boolean rememberMe)
    • getRememberMe

      @Nonnull public Boolean getRememberMe()
      Whether the session is remembered: its refresh cookie is persistent and the longer Remember Me inactivity window applies, never past the absolute expiry.
      Returns:
      rememberMe
    • setRememberMe

      public void setRememberMe(@Nonnull Boolean rememberMe)
    • clientAddress

      public HumanSessionResponse clientAddress(@Nullable String clientAddress)
    • getClientAddress

      @Nullable public String getClientAddress()
      The client address the sign-in came from, as the platform resolved it. Null when none was recorded.
      Returns:
      clientAddress
    • setClientAddress

      public void setClientAddress(@Nullable String clientAddress)
    • userAgent

      public HumanSessionResponse userAgent(@Nullable String userAgent)
    • getUserAgent

      @Nullable public String getUserAgent()
      The user agent of the sign-in. Null when none was recorded.
      Returns:
      userAgent
    • setUserAgent

      public void setUserAgent(@Nullable String userAgent)
    • current

      public HumanSessionResponse current(@Nonnull Boolean current)
    • getCurrent

      @Nonnull public Boolean getCurrent()
      Whether the request that listed the session came from it.
      Returns:
      current
    • setCurrent

      public void setCurrent(@Nonnull Boolean current)
    • breakGlass

      public HumanSessionResponse breakGlass(@Nonnull Boolean breakGlass)
    • getBreakGlass

      @Nonnull public Boolean getBreakGlass()
      Whether the session is a break-glass session: opened through the emergency-access entry by a designated break-glass member with a security key or a device-bound passkey. Its access tokens carry the `break_glass` claim; it is never remembered and cannot switch tenant.
      Returns:
      breakGlass
    • setBreakGlass

      public void setBreakGlass(@Nonnull Boolean breakGlass)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to HumanSessionResponse
    • validateJsonElementAsCandidate

      public static void validateJsonElementAsCandidate(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element as a candidate of a oneOf schema: the checks of validateJsonElement(JsonElement), and the element carries no member this model does not declare. A oneOf schema without a discriminator tells its candidates apart by their member sets, so a candidate is matched on its closed member set.
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is not a HumanSessionResponse
    • fromJson

      public static HumanSessionResponse fromJson(String jsonString) throws IOException
      Create an instance of HumanSessionResponse given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of HumanSessionResponse
      Throws:
      IOException - if the JSON string is invalid with respect to HumanSessionResponse
    • toJson

      public String toJson()
      Convert an instance of HumanSessionResponse to an JSON string
      Returns:
      JSON string