Record Class RequestContext

java.lang.Object
java.lang.Record
org.keycloak.broker.oid4vp.RequestContext

public record RequestContext(String rootSessionId, String tabId, String nonce, EphemeralKey encryptionKey) extends Record
The verifier side state of one wallet login, written to the single use object store when the login page is rendered and read while serving the request object and the presentation. It carries the ids to recover the authentication session, the nonce the wallet must echo in the key binding JWT, and (for direct_post.jwt) the ephemeral response encryption key.
  • Constructor Details

    • RequestContext

      public RequestContext(String rootSessionId, String tabId, String nonce, EphemeralKey encryptionKey)
      Creates an instance of a RequestContext record class.
      Parameters:
      rootSessionId - the value for the rootSessionId record component
      tabId - the value for the tabId record component
      nonce - the value for the nonce record component
      encryptionKey - the value for the encryptionKey record component
  • Method Details

    • isEncrypted

      public boolean isEncrypted()
    • clientMetadata

      public Map<String,Object> clientMetadata()
    • toMap

      public Map<String,String> toMap()
    • fromMap

      public static RequestContext fromMap(Map<String,String> map)
    • toString

      public final 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.
    • rootSessionId

      public String rootSessionId()
      Returns the value of the rootSessionId record component.
      Returns:
      the value of the rootSessionId record component
    • tabId

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

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

      public EphemeralKey encryptionKey()
      Returns the value of the encryptionKey record component.
      Returns:
      the value of the encryptionKey record component