Skip to content

OpenID Connect Discovery

WSO2 Identity Server supports OpenID Connect Discovery to discover an end user's OpenID provider, and also to obtain information required to interact with the OpenID provider, including its OAuth 2.0 endpoint locations. For more information, see IssuerDiscovery .

The OpenID Connect discovery endpoint is as follows:

https://localhost:9443/oauth2/oidcdiscovery

The following sections provide information and instructions on the following:

OpenID Provider Issuer discovery

OpenID Provider Issuer discovery refers to the process of determining the location of the OpenID Provider.

Tip

In WSO2 Identity Server, the default OpenID Provider Issuer location path is set to oidcdiscovery/.well-known/openid-configuration .

To move the OpenID provider issuer location path to the root <issuer>/.well-known/openid-configuration, add the following configuration to the <IS_HOME>/repository/conf/deployment.toml file.

[oauth.endpoints]
oidc_discovery_url= "${carbon.protocol}://${carbon.host}:${carbon.management.port}/oauth2/token</"
Configuring the OpenID Provider Issuer location

In WSO2 Identity Server, the resident IdP Entity ID for OpenID Connect can be configured as the OpenID Provider Issuer location. Follow the instructions given below to configure the OpenID Provider Issuer location.

  1. Log in to the management console.

  2. Click Resident under Identity Providers on the Main tab.

  3. Expand the Inbound Authentication Configuration section and then expand OAuth2/OpenID Connect Configuration.
  4. Enter a valid OpenID Provider issuer location as the Identity Provider Entity Id value.
    idp-entity-id

    Tip

    A valid OpenID Provider Issuer location in WSO2 Identity Server has the following format.

    OpenID Provider Issuer URL format

    <Host>/oauth2/{issuer}
    • \<Host>: The host number of WSO2 Identity Server (e.g., https://localhost:9443 )

    • {issuer}: The issuer path component. This value can be either ‘token’ or ‘oidcdiscovery’.

    Sample OpenID Provider Issuer location

    https://localhost:9443/oauth2/token

Obtaining the OpenID Provider Issuer location

Once the issuer location has been configured as instructed in the previous section, you can send a request to the endpoint to obtain the configured OpenID Provider Issuer location.

The following information is required to make a request.

Parameter Description Sample Value
Resource Identifier for the target end user that is the subject of the discovery request. acct:admin@localhost (for super tenant)
acct:admin@ wso2.com@localhost (for tenant)
HostServer Where the WebFinger service is hosted. localhost
rel URI identifying the type of service whose location is being requested. http://openid.net/specs/connect/1.0/issuer

Sample requests and responses are given below:

Request (for super tenant)
Response (for super tenant)
Request (for tenant: wso2.com )
Response (for tenant: wso2.com )

Obtaining the OpenID Provider configuration information

Follow the instructions below to obtain configuration details of the OpenID Proivder.

  1. Once you receive the response as shown in the sample response of the previous section, append " /.well-known/openid-configuration" to the href value that you received.

    https://localhost:9443/oauth2/token/.well-known/openid-configuration
  2. Send a request to the endpoint as shown below.

    Request
    Response

Top