Skip to content

Commit 35cbbb0

Browse files
authored
Merge pull request #1 from himeshsiriwardana/pr-5532
added a description for clarity
2 parents 584598e + 0b3ef4d commit 35cbbb0

File tree

1 file changed

+51
-37
lines changed

1 file changed

+51
-37
lines changed

en/includes/guides/authentication/oidc/discover-oidc-configs.md

Lines changed: 51 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,41 @@
1-
# Discover OpenID Connect endpoints of {{ product_name }}
1+
# Discover OpenID Connect endpoints and configurations
22

3-
When you build OpenID Connect login in your application using {{ product_name }} as your identity provider, you need to get the OpenID Connect endpoints and configurations from {{ product_name }}.
3+
When building OpenID Connect (OIDC) login in your application using {{product_name}} as your identity provider, your application needs the relevant OIDC endpoints and configurations. Your application can get these endpoints in **two main steps**:
44

5-
You can do this by invoking the discovery endpoint API or by using the {{ product_name }} Console as explained below.
5+
1. **Discover the issuer (Optional)**:
66

7-
## Prerequisite
7+
When the issuer URL of the OpenID Provider is not known in advance, your application can dynamically discover it using the **WebFinger** endpoint.
8+
9+
2. **Retrieve the OpenID Connect metadata from the issuer**:
10+
11+
Once your application discovers the issuer URL (either via WebFinger or because it’s already configured), your application can fetch the OpenID Connect metadata. This includes all the necessary endpoints (authorization, token, introspection, revocation, logout, etc.), supported scopes, response types, claims, and client authentication methods.
12+
13+
For clients or SDKs that cannot dynamically fetch these endpoints, you can get them manually from the {{product_name}} Console.
14+
15+
This guide explains how to discover the OpenID Connect endpoints of {{ product_name }} using both the API and the Console.
16+
17+
## Prerequisites
818

919
To get started, you need to have an application registered in {{ product_name }}:
1020

1121
- Register a [single-page app with OIDC]({{base_path}}/guides/applications/register-single-page-app/).
1222
- Register a [web app with OIDC]({{base_path}}/guides/applications/register-oidc-web-app/).
1323

14-
## Use the discovery endpoint
24+
## Use the API
1525

16-
### Discover the issuer
26+
This section explains how your application can dynamically discover the OpenID Connect endpoints.
1727

18-
OpenID Provider issuer discovery refers to the process of determining the location
19-
of the OpenID Provider. The following endpoint is responsible for revealing the OpenID Provider's
20-
issuer after validating the required parameters (Resource, Host and rel).
28+
### Step 1: Discover the issuer
29+
30+
OpenID Provider issuer discovery, process allows a client application to automatically find the location (issuer URL) of the OpenID Provider.
31+
32+
You can use the following endpoint to retrieve the issuer information.
2133

2234
```bash
2335
{{ product_url_format }}/.well-known/webfinger
2436
```
2537

26-
Following information is required when making a request to discover the issuer's location.
38+
The endpoint accepts the following required parameters.
2739

2840
<table>
2941
<thead>
@@ -35,24 +47,24 @@ Following information is required when making a request to discover the issuer's
3547
</thead>
3648
<tbody>
3749
<tr class="odd">
38-
<td>Resource</td>
39-
<td>Identifier for the target end user that is the subject of the discovery request.</td>
50+
<td><code>resource</code></td>
51+
<td>The identifier of the user whose OpenID Provider (issuer) you want to discover.</td>
4052
<td>acct:admin@localhost</td>
4153
</tr>
4254
<tr class="even">
43-
<td>HostServer</td>
44-
<td>Where the WebFinger service is hosted.</td>
45-
<td>localhost</td>
55+
<td><code>host</code></td>
56+
<td>Specify the domain or server that hosts the WebFinger service.</td>
57+
<td>localhost:9443</td>
4658
</tr>
4759
<tr class="odd">
48-
<td>rel</td>
49-
<td>URI identifying the type of service whose location is being requested.</td>
60+
<td><code>rel</code></td>
61+
<td>Specify the URI that identifies the type of service you want to locate.</td>
5062
<td>http://openid.net/specs/connect/1.0/issuer</td>
5163
</tr>
5264
</tbody>
5365
</table>
5466

55-
**Sample request**
67+
#### Sample request
5668

5769
=== "cURL"
5870

@@ -104,7 +116,8 @@ Following information is required when making a request to discover the issuer's
104116
```
105117

106118

107-
**Sample response**
119+
#### Sample response
120+
108121
```json
109122
{
110123
"subject": "acct:admin@localhost",
@@ -117,23 +130,25 @@ Following information is required when making a request to discover the issuer's
117130
}
118131
```
119132

120-
### Discover the issuer metadata
133+
### Step 2: Discover the issuer metadata
121134

122-
OpenID Connect Discovery <!-- [OpenID Connect Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html)--> allows you to discover the metadata such as endpoints, scopes, response types, claims, and supported client authentication methods of identity providers such as {{ product_name }}.
135+
[OpenID Connect Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) allows you to discover the metadata such as endpoints, scopes, response types, claims, and supported client authentication methods of identity providers such as {{ product_name }}.
123136

124137
Applications can dynamically discover the OpenID Connect identity provider metadata by calling the OpenID Connect discovery <!-- [OpenID Connect discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationRequest)--> endpoint. The structure of the request URL is as follows: `<issuer>/.well-known/openid-configuration`.
125138

126-
**Issuer of {{ product_name }}**
127-
```bash
128-
{{ product_url_format }}/oauth2/token
129-
```
139+
- Issuer of {{ product_name }}
130140

131-
**Discovery endpoint of {{ product_name }}**
132-
```bash
133-
{{ product_url_format }}/oauth2/token/.well-known/openid-configuration
134-
```
141+
```bash
142+
{{ product_url_format }}/oauth2/token
143+
```
135144

136-
**Sample request**
145+
- Discovery endpoint of {{ product_name }}
146+
147+
```bash
148+
{{ product_url_format }}/oauth2/token/.well-known/openid-configuration
149+
```
150+
151+
#### Sample request
137152

138153
=== "cURL"
139154

@@ -175,8 +190,9 @@ Applications can dynamically discover the OpenID Connect identity provider metad
175190
});
176191
```
177192

178-
**Sample response**
179-
```json
193+
#### Sample response
194+
195+
```json
180196
{
181197
"introspection_endpoint" : "{{ product_url_sample }}/oauth2/introspect",
182198
"end_session_endpoint" : "{{ product_url_sample }}/oidc/logout",
@@ -189,15 +205,13 @@ Applications can dynamically discover the OpenID Connect identity provider metad
189205
}
190206
```
191207

192-
## Use the console
193-
194-
Some applications and SDKs are not capable of dynamically resolving endpoints from OpenID Connect discovery. For such applications, you need to configure endpoints manually.
208+
## Use the Console
195209

196-
You can get the endpoints from the console as follows:
210+
For applications and SDKs that can't dynamically resolve OpenID Connect endpoints, you can manually copy the relevant information from the Console. To do so,
197211
198212
1. On the {{ product_name }}, go to **Applications**.
199213
200-
2. Select an OIDC application from the list.
214+
2. Select your OIDC application from the list.
201215
202216
3. Go to the **Info** tab of the application and find the server endpoints to your organization.
203217

0 commit comments

Comments
 (0)