Record Class OAuthClient

java.lang.Object
java.lang.Record
dev.relism.flash.ext.security.oauthserver.OAuthClient
Record Components:
id - either issued at registration, or the https URL of the client's metadata document

public record OAuthClient(String id, String secretHash, Map<String,Object> metadata) extends Record
A client of the authorization server, described by its RFC 7591 metadata exactly as it was registered (defaults filled in). A confidential client's secret is kept only as a hash; a public one has none.
  • Constructor Details

    • OAuthClient

      public OAuthClient(String id, String secretHash, Map<String,Object> metadata)
      Creates an instance of a OAuthClient record class.
      Parameters:
      id - the value for the id record component
      secretHash - the value for the secretHash record component
      metadata - the value for the metadata record component
  • Method Details

    • authMethod

      public String authMethod()
      none, client_secret_basic or client_secret_post.
    • redirectUris

      public List<String> redirectUris()
    • grantTypes

      public Set<String> grantTypes()
    • name

      public String name()
      What a consent page calls it: its client_name, or its id when it gave none.
    • 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.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • secretHash

      public String secretHash()
      Returns the value of the secretHash record component.
      Returns:
      the value of the secretHash record component
    • metadata

      public Map<String,Object> metadata()
      Returns the value of the metadata record component.
      Returns:
      the value of the metadata record component