Class DiscoveryData

java.lang.Object
uk.co.spudsoft.jwtvalidatorvertx.DiscoveryData

public class DiscoveryData extends Object
Represents the data returned in an OpenID Connect Discovery response. The data is stored in a JsonObject and fields are extracted from it as required (i.e. this class does not parse the JSON as such). The specification for OpenID Connect Discovery is at https://openid.net/specs/openid-connect-discovery-1_0.html
Author:
jtalbut
  • Constructor Details

    • DiscoveryData

      public DiscoveryData(io.vertx.core.json.JsonObject json)
      Constructor.
      Parameters:
      json - The JSON data in the body of the discovery response.
  • Method Details

    • get

      public Object get(String key)
      Get a value from the response.
      Parameters:
      key - the key to extract from the response.
      Returns:
      the value from the response with the given key.
    • getIssuer

      public String getIssuer()
      Get the issuer. REQUIRED. URL using the https scheme with no query or fragment component that the OP asserts as its Issuer Identifier. If Issuer discovery is supported (see Section 2), this value MUST be identical to the issuer value returned by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this Issuer.
      Returns:
      the issuer.
    • getAuthorizationEndpoint

      public String getAuthorizationEndpoint()
      Get the authorization endpoint. REQUIRED. URL of the OP's OAuth 2.0 Authorization Endpoint [OpenID.Core].
      Returns:
      the authorization endpoint.
    • getTokenEndpoint

      public String getTokenEndpoint()
      Get the token endpoint. URL of the OP's OAuth 2.0 Token Endpoint [OpenID.Core]. This is REQUIRED unless only the Implicit Flow is used.
      Returns:
      the token endpoint.
    • getUserinfoEndpoint

      public String getUserinfoEndpoint()
      Get the user-info endpoint. RECOMMENDED. URL of the OP's UserInfo Endpoint [OpenID.Core]. This URL MUST use the https scheme and MAY contain port, path, and query parameter components.
      Returns:
      the user-info endpoint.
    • getJwksUri

      public String getJwksUri()
      Get the JWKS URI. REQUIRED. URL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate.
      Returns:
      the JWKS URI.
    • getRegistrationEndpoint

      public String getRegistrationEndpoint()
      Get the registration endpoint. RECOMMENDED. URL of the OP's Dynamic Client Registration Endpoint [OpenID.Registration].
      Returns:
      the registration endpoint.
    • getScopesSupported

      public io.vertx.core.json.JsonArray getScopesSupported()
      Get the scopes supported. RECOMMENDED. JSON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported.
      Returns:
      the scopes supported.
    • getResponseTypesSupported

      public io.vertx.core.json.JsonArray getResponseTypesSupported()
      Get the response types supported. REQUIRED. JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values.
      Returns:
      the response types supported.
    • getResponseModesSupported

      public io.vertx.core.json.JsonArray getResponseModesSupported()
      Get the response modes supported. OPTIONAL. JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports, as specified in OAuth 2.0 Multiple Response Type Encoding Practices [OAuth.Responses]. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"].
      Returns:
      the response modes supported.
    • getGrantTypesSupported

      public io.vertx.core.json.JsonArray getGrantTypesSupported()
      Get the grant types supported. OPTIONAL. JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].
      Returns:
      the grant types supported.
    • getAcrValuesSupported

      public io.vertx.core.json.JsonArray getAcrValuesSupported()
      Get the authentication context class references supposed. OPTIONAL. JSON array containing a list of the Authentication Context Class References that this OP supports.
      Returns:
      the authentication context class references supposed.
    • getSubjectTypesSupported

      public io.vertx.core.json.JsonArray getSubjectTypesSupported()
      Get the subject types supported. REQUIRED. JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public.
      Returns:
      the subject types supported.
    • getIdTokenSigningAlgValuesSupported

      public io.vertx.core.json.JsonArray getIdTokenSigningAlgValuesSupported()
      Get the token signing algorithms supported. REQUIRED. JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT]. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow).
      Returns:
      the token signing algorithms supported.