Record Class McpOAuthDiscovery.OAuthMetadata

java.lang.Object
java.lang.Record
com.tnsai.mcp.auth.McpOAuthDiscovery.OAuthMetadata
Record Components:
issuer - the authorization server issuer identifier
authorizationEndpoint - the authorization endpoint URL
tokenEndpoint - the token endpoint URL
registrationEndpoint - the dynamic client registration endpoint (RFC 7591), may be null
responseTypesSupported - supported response types
grantTypesSupported - supported grant types
codeChallengeMethodsSupported - supported PKCE code challenge methods
Enclosing class:
McpOAuthDiscovery

public static record McpOAuthDiscovery.OAuthMetadata(String issuer, String authorizationEndpoint, String tokenEndpoint, String registrationEndpoint, List<String> responseTypesSupported, List<String> grantTypesSupported, List<String> codeChallengeMethodsSupported) extends Record
OAuth authorization server metadata as defined by RFC 8414.
  • Constructor Details

  • Method Details

    • 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.
    • issuer

      public String issuer()
      Returns the value of the issuer record component.
      Returns:
      the value of the issuer record component
    • authorizationEndpoint

      public String authorizationEndpoint()
      Returns the value of the authorizationEndpoint record component.
      Returns:
      the value of the authorizationEndpoint record component
    • tokenEndpoint

      public String tokenEndpoint()
      Returns the value of the tokenEndpoint record component.
      Returns:
      the value of the tokenEndpoint record component
    • registrationEndpoint

      public String registrationEndpoint()
      Returns the value of the registrationEndpoint record component.
      Returns:
      the value of the registrationEndpoint record component
    • responseTypesSupported

      public List<String> responseTypesSupported()
      Returns the value of the responseTypesSupported record component.
      Returns:
      the value of the responseTypesSupported record component
    • grantTypesSupported

      public List<String> grantTypesSupported()
      Returns the value of the grantTypesSupported record component.
      Returns:
      the value of the grantTypesSupported record component
    • codeChallengeMethodsSupported

      public List<String> codeChallengeMethodsSupported()
      Returns the value of the codeChallengeMethodsSupported record component.
      Returns:
      the value of the codeChallengeMethodsSupported record component