Record Class OidcMetadata

java.lang.Object
java.lang.Record
org.apache.juneau.rest.auth.oauth.oidc.OidcMetadata
Record Components:
issuer - The issuer URI. Never null.
tokenEndpoint - The token_endpoint URI.
authorizationEndpoint - The authorization_endpoint URI. May be null for pure machine-to-machine IdPs.
introspectionEndpoint - The RFC 7662 introspection endpoint URI. May be null.
jwksUri - The jwks_uri URI.
userinfoEndpoint - The OIDC userinfo_endpoint URI. May be null.
endSessionEndpoint - The OIDC end-session endpoint URI. May be null.
supportedScopes - Scopes the IdP advertises support for. May be empty.
extras - Unknown / IdP-specific fields. Read-only map.

public record OidcMetadata(URI issuer, URI tokenEndpoint, URI authorizationEndpoint, URI introspectionEndpoint, URI jwksUri, URI userinfoEndpoint, URI endSessionEndpoint, Set<String> supportedScopes, Map<String,Object> extras) extends Record
Immutable record produced by OidcDiscoveryClient carrying the metadata fields a Juneau OAuth / OIDC consumer typically needs.

Unknown fields (IdP-specific extensions) are preserved in extras() as a read-only Map<String,Object>.

Since:
10.0.0
  • Constructor Details

    • OidcMetadata

      public OidcMetadata(URI issuer, URI tokenEndpoint, URI authorizationEndpoint, URI introspectionEndpoint, URI jwksUri, URI userinfoEndpoint, URI endSessionEndpoint, Set<String> supportedScopes, Map<String,Object> extras)
      Compact constructor that defensively copies the collections.
  • Method Details

    • authorizationResponseIssParameterSupported

      Returns whether the authorization server advertises authorization_response_iss_parameter_supported (RFC 9207).

      When true, a compliant client MUST reject an authorization response that omits the iss parameter.

      Returns:
      true if the authorization_response_iss_parameter_supported extra is present and set to true.
    • 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 URI issuer()
      Returns the value of the issuer record component.
      Returns:
      the value of the issuer record component
    • tokenEndpoint

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

      Returns the value of the authorizationEndpoint record component.
      Returns:
      the value of the authorizationEndpoint record component
    • introspectionEndpoint

      Returns the value of the introspectionEndpoint record component.
      Returns:
      the value of the introspectionEndpoint record component
    • jwksUri

      public URI jwksUri()
      Returns the value of the jwksUri record component.
      Returns:
      the value of the jwksUri record component
    • userinfoEndpoint

      Returns the value of the userinfoEndpoint record component.
      Returns:
      the value of the userinfoEndpoint record component
    • endSessionEndpoint

      Returns the value of the endSessionEndpoint record component.
      Returns:
      the value of the endSessionEndpoint record component
    • supportedScopes

      Returns the value of the supportedScopes record component.
      Returns:
      the value of the supportedScopes record component
    • extras

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