API Stability Long-Term

The fetchOIDCMetadataFromDiscoveryEndpoint() GraphQL query field can fetch the OIDC metadata from a discovery endpoint provided (e.g., .well-known/openid-configuration).

For more information on OpenID Connect, see the Authenticating with OpenID Connect documentation page. You may also want to look at Authentication & Identity Providers for related information.

Syntax

Below is the syntax for the fetchOIDCMetadataFromDiscoveryEndpoint() query field:

graphql
fetchOIDCMetadataFromDiscoveryEndpoint(
     discoveryEndpoint: string!
   ): WellKnownEndpointDetails!

Below is an example of this query, along with requests for several return parameters:

Show:
graphql
query {
  fetchOIDCMetadataFromDiscoveryEndpoint(discoveryEndpoint: "https://oidc.company.com") {
    authorizationEndpoint
    jwksEndpoint
    registrationEndpoint
    tokenEndpoint
    userInfoEndpoint
  }
}

Returned Datatypes

The returned datatype WellKnownEndpointDetails has its own parameters. Below is a list of them along with their datatypes and a description of each:

Table: WellKnownEndpointDetails

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Oct 7, 2024
authorizationEndpointstring  Long-TermA URL to the endpoint a user should be redirected to when authorizing.
issuerstringyes Long-TermThe authentication provider issuer.
jwksEndpointstring  Long-TermA URL to the JWKS endpoint for retrieving keys for validating tokens. Required.
registrationEndpointstring  Long-TermTo use OIDC as a client, PUBLIC_URL must be set, LogScale must be registered as a client with your OpenID provider, and the provider must allow %PUBLIC_URL%/auth/oidc as a valid redirect endpoint for the client.
tokenEndpointstring  Long-TermA URL to the token endpoint used to exchange a authentication code to an access token. Required for clients.
tokenEndpointAuthMethodstringyes Long-TermThe authentication method used to authenticate LogScale against the token endpoint. Can either be client_secret_basic or client_secret_post for placing the client id and secret in either basic auth or post data, respectively. Defaults to client_secret_basic, or client_secret_post if client_secret_basic is not supported as per the discovery endpoint.
userInfoEndpointstring  Long-TermA URL to the user info endpoint used to retrieve user information from an access token.