Package com.tnsai.mcp.auth
Record Class McpOAuthDiscovery.OAuthMetadata
java.lang.Object
java.lang.Record
com.tnsai.mcp.auth.McpOAuthDiscovery.OAuthMetadata
- Record Components:
issuer- the authorization server issuer identifier- the authorization endpoint URLtokenEndpoint- the token endpoint URLregistrationEndpoint- the dynamic client registration endpoint (RFC 7591), may be nullresponseTypesSupported- supported response typesgrantTypesSupported- supported grant typescodeChallengeMethodsSupported- 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 Summary
ConstructorsConstructorDescriptionOAuthMetadata(String issuer, String authorizationEndpoint, String tokenEndpoint, String registrationEndpoint, List<String> responseTypesSupported, List<String> grantTypesSupported, List<String> codeChallengeMethodsSupported) Creates an instance of aOAuthMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theauthorizationEndpointrecord component.Returns the value of thecodeChallengeMethodsSupportedrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegrantTypesSupportedrecord component.final inthashCode()Returns a hash code value for this object.issuer()Returns the value of theissuerrecord component.Returns the value of theregistrationEndpointrecord component.Returns the value of theresponseTypesSupportedrecord component.Returns the value of thetokenEndpointrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OAuthMetadata
public OAuthMetadata(String issuer, String authorizationEndpoint, String tokenEndpoint, String registrationEndpoint, List<String> responseTypesSupported, List<String> grantTypesSupported, List<String> codeChallengeMethodsSupported) Creates an instance of aOAuthMetadatarecord class.- Parameters:
issuer- the value for theissuerrecord componentauthorizationEndpoint- the value for theauthorizationEndpointrecord componenttokenEndpoint- the value for thetokenEndpointrecord componentregistrationEndpoint- the value for theregistrationEndpointrecord componentresponseTypesSupported- the value for theresponseTypesSupportedrecord componentgrantTypesSupported- the value for thegrantTypesSupportedrecord componentcodeChallengeMethodsSupported- the value for thecodeChallengeMethodsSupportedrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
issuer
Returns the value of theissuerrecord component.- Returns:
- the value of the
issuerrecord component
-
authorizationEndpoint
Returns the value of theauthorizationEndpointrecord component.- Returns:
- the value of the
authorizationEndpointrecord component
-
tokenEndpoint
Returns the value of thetokenEndpointrecord component.- Returns:
- the value of the
tokenEndpointrecord component
-
registrationEndpoint
Returns the value of theregistrationEndpointrecord component.- Returns:
- the value of the
registrationEndpointrecord component
-
responseTypesSupported
Returns the value of theresponseTypesSupportedrecord component.- Returns:
- the value of the
responseTypesSupportedrecord component
-
grantTypesSupported
Returns the value of thegrantTypesSupportedrecord component.- Returns:
- the value of the
grantTypesSupportedrecord component
-
codeChallengeMethodsSupported
Returns the value of thecodeChallengeMethodsSupportedrecord component.- Returns:
- the value of the
codeChallengeMethodsSupportedrecord component
-