Record Class McpClientRegistration
java.lang.Object
java.lang.Record
org.apache.juneau.rest.client.mcp.auth.McpClientRegistration
- Record Components:
clientId- The registeredclient_id. Nevernull.clientSecret- The issuedclient_secret, if the AS issued one (absent for a public/native client).clientSecretExpiresAt- The instant theclient_secretexpires, if the AS returned a non-zeroclient_secret_expires_at.registrationAccessToken- The RFC 7592 registration access token, if the AS issued one.registrationClientUri- The RFC 7592 registration client URI, if the AS returned one.issuer- The authorization serverissuerthese credentials were registered with (the SEP-2352 key). Nevernull.redirectUris- The redirect URIs that were registered, in registration order. Nevernull.applicationType- The declaredapplication_type. Nevernull.extras- Any non-standard fields the AS returned. Read-only map. Nevernull.
public record McpClientRegistration(String clientId, Optional<String> clientSecret, Optional<Instant> clientSecretExpiresAt, Optional<String> registrationAccessToken, Optional<URI> registrationClientUri, URI issuer, List<URI> redirectUris, McpApplicationType applicationType, Map<String,Object> extras)
extends Record
Immutable result of a Dynamic Client Registration (SEP-837) round-trip — the client credentials and metadata an
authorization server issued, keyed by the AS
issuer for SEP-2352 credential binding.
Never log clientSecret / registrationAccessToken. toString() redacts both
secret-bearing fields (mirroring the OAuthToken / KeyedSecret redaction discipline) so credential
material never reaches logs via this record's auto-generated form.
- Since:
- 10.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionMcpClientRegistration(String clientId, Optional<String> clientSecret, Optional<Instant> clientSecretExpiresAt, Optional<String> registrationAccessToken, Optional<URI> registrationClientUri, URI issuer, List<URI> redirectUris, McpApplicationType applicationType, Map<String, Object> extras) Compact constructor enforcing non-null fields and defensively copying the collections. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theapplicationTyperecord component.clientId()Returns the value of theclientIdrecord component.Returns the value of theclientSecretrecord component.Returns the value of theclientSecretExpiresAtrecord component.final booleanIndicates whether some other object is "equal to" this one.extras()Returns the value of theextrasrecord component.final inthashCode()Returns a hash code value for this object.booleanWhether these credentials include a client secret (a confidential client) versus a public/native client that authenticates with PKCE alone.issuer()Returns the value of theissuerrecord component.Returns the value of theredirectUrisrecord component.Returns the value of theregistrationAccessTokenrecord component.Returns the value of theregistrationClientUrirecord component.toString()Redacts the secret-bearing fields so credential material never reaches logs via this record'stoString().
-
Constructor Details
-
McpClientRegistration
public McpClientRegistration(String clientId, Optional<String> clientSecret, Optional<Instant> clientSecretExpiresAt, Optional<String> registrationAccessToken, Optional<URI> registrationClientUri, URI issuer, List<URI> redirectUris, McpApplicationType applicationType, Map<String, Object> extras) Compact constructor enforcing non-null fields and defensively copying the collections.
-
-
Method Details
-
isConfidential
Whether these credentials include a client secret (a confidential client) versus a public/native client that authenticates with PKCE alone.- Returns:
true if aclient_secretwas issued.
-
toString
Redacts the secret-bearing fields so credential material never reaches logs via this record'stoString(). -
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). -
clientId
Returns the value of theclientIdrecord component.- Returns:
- the value of the
clientIdrecord component
-
clientSecret
Returns the value of theclientSecretrecord component.- Returns:
- the value of the
clientSecretrecord component
-
clientSecretExpiresAt
Returns the value of theclientSecretExpiresAtrecord component.- Returns:
- the value of the
clientSecretExpiresAtrecord component
-
registrationAccessToken
Returns the value of theregistrationAccessTokenrecord component.- Returns:
- the value of the
registrationAccessTokenrecord component
-
registrationClientUri
Returns the value of theregistrationClientUrirecord component.- Returns:
- the value of the
registrationClientUrirecord component
-
issuer
Returns the value of theissuerrecord component.- Returns:
- the value of the
issuerrecord component
-
redirectUris
Returns the value of theredirectUrisrecord component.- Returns:
- the value of the
redirectUrisrecord component
-
applicationType
Returns the value of theapplicationTyperecord component.- Returns:
- the value of the
applicationTyperecord component
-
extras
Returns the value of theextrasrecord component.- Returns:
- the value of the
extrasrecord component
-