Record Class LoginStateStore.PendingLogin

java.lang.Object
java.lang.Record
org.apache.juneau.rest.server.auth.oidc.rp.LoginStateStore.PendingLogin
Record Components:
nonce - The OIDC nonce. Redacted in toString().
codeVerifier - The PKCE code_verifier. Redacted in toString().
redirectTarget - The post-login redirect target. May be null. Re-validated by the RP.
createdAt - Framework-minted store instant.
expiresAt - Framework-minted expiry ceiling (createdAt + stateNonceTtl).
Enclosing interface:
LoginStateStore

public static record LoginStateStore.PendingLogin(String nonce, String codeVerifier, String redirectTarget, Instant createdAt, Instant expiresAt) extends Record
A pending-login association awaiting the IdP callback.

Secret-bearing record. codeVerifier and nonce are credentials (see the SPI security contract). toString() redacts both, matching OAuthToken.toString() and the MCP PendingAuthorization precedent, so a stray log line, exception message, or debugger dump does not disclose them.

Framework-minted timestamps. The relying party stamps createdAt (from its configured Clock) and expiresAt (createdAt plus the RP's capped stateNonceTtl). A store MUST persist these as opaque values and MUST NOT recompute them at consume time — the RP re-checks expiresAt independently, so an honest store that forgot to expire a record cannot extend usability. Either timestamp may be null only for a foreign / deserialized blob; the RP treats a null createdAt / expiresAt on consume as expired (fail-closed), so no compact-constructor requireNonNull is imposed here.

  • Constructor Details

    • PendingLogin

      public PendingLogin(String nonce, String codeVerifier, String redirectTarget, Instant createdAt, Instant expiresAt)
      Creates an instance of a PendingLogin record class.
      Parameters:
      nonce - the value for the nonce record component
      codeVerifier - the value for the codeVerifier record component
      redirectTarget - the value for the redirectTarget record component
      createdAt - the value for the createdAt record component
      expiresAt - the value for the expiresAt record component
  • Method Details

    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • nonce

      public String nonce()
      Returns the value of the nonce record component.
      Returns:
      the value of the nonce record component
    • codeVerifier

      public String codeVerifier()
      Returns the value of the codeVerifier record component.
      Returns:
      the value of the codeVerifier record component
    • redirectTarget

      Returns the value of the redirectTarget record component.
      Returns:
      the value of the redirectTarget record component
    • createdAt

      public Instant createdAt()
      Returns the value of the createdAt record component.
      Returns:
      the value of the createdAt record component
    • expiresAt

      public Instant expiresAt()
      Returns the value of the expiresAt record component.
      Returns:
      the value of the expiresAt record component