Skip to content

Commit 584598e

Browse files
committed
Add missing discovery endpoint info.
1 parent eeed681 commit 584598e

File tree

1 file changed

+107
-1
lines changed

1 file changed

+107
-1
lines changed

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

Lines changed: 107 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,112 @@ To get started, you need to have an application registered in {{ product_name }}
1313

1414
## Use the discovery endpoint
1515

16+
### Discover the issuer
17+
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).
21+
22+
```bash
23+
{{ product_url_format }}/.well-known/webfinger
24+
```
25+
26+
Following information is required when making a request to discover the issuer's location.
27+
28+
<table>
29+
<thead>
30+
<tr class="header">
31+
<th>Parameter</th>
32+
<th>Description</th>
33+
<th>Sample Value</th>
34+
</tr>
35+
</thead>
36+
<tbody>
37+
<tr class="odd">
38+
<td>Resource</td>
39+
<td>Identifier for the target end user that is the subject of the discovery request.</td>
40+
<td>acct:admin@localhost</td>
41+
</tr>
42+
<tr class="even">
43+
<td>HostServer</td>
44+
<td>Where the WebFinger service is hosted.</td>
45+
<td>localhost</td>
46+
</tr>
47+
<tr class="odd">
48+
<td>rel</td>
49+
<td>URI identifying the type of service whose location is being requested.</td>
50+
<td>http://openid.net/specs/connect/1.0/issuer</td>
51+
</tr>
52+
</tbody>
53+
</table>
54+
55+
**Sample request**
56+
57+
=== "cURL"
58+
59+
```bash
60+
curl --location 'https://localhost:9443/.well-known/webfinger/openid-configuration?resource=acct:admin@localhost&rel=http://openid.net/specs/connect/1.0/issuer'
61+
```
62+
63+
=== "JavaScript - jQuery"
64+
65+
```js
66+
var settings = {
67+
"url": "{{ product_url_sample }}/.well-known/webfinger/openid-configuration",
68+
"method": "GET",
69+
"timeout": 0,
70+
"headers": { "Accept": "application/json" },
71+
"data": {
72+
"resource": "acct:admin@localhost",
73+
"rel": "http://openid.net/specs/connect/1.0/issuer"
74+
}
75+
};
76+
77+
$.ajax(settings).done(function (response) {
78+
console.log(response);
79+
});
80+
```
81+
82+
=== "Nodejs - Axios"
83+
84+
```js
85+
var axios = require('axios');
86+
87+
var config = {
88+
method: 'get',
89+
url: '{{ product_url_sample }}/.well-known/webfinger/openid-configuration',
90+
params: {
91+
resource: 'acct:admin@localhost',
92+
rel: 'http://openid.net/specs/connect/1.0/issuer'
93+
},
94+
headers: { 'Accept': 'application/json' }
95+
};
96+
97+
axios(config)
98+
.then(function (response) {
99+
console.log(JSON.stringify(response.data));
100+
})
101+
.catch(function (error) {
102+
console.log(error);
103+
});
104+
```
105+
106+
107+
**Sample response**
108+
```json
109+
{
110+
"subject": "acct:admin@localhost",
111+
"links": [
112+
{
113+
"rel": "http://openid.net/specs/connect/1.0/issuer",
114+
"href": "{{ product_url_sample }}/oauth2/token"
115+
}
116+
]
117+
}
118+
```
119+
120+
### Discover the issuer metadata
121+
16122
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 }}.
17123

18124
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`.
@@ -83,7 +189,7 @@ Applications can dynamically discover the OpenID Connect identity provider metad
83189
}
84190
```
85191

86-
## Get endpoints from the console
192+
## Use the console
87193

88194
Some applications and SDKs are not capable of dynamically resolving endpoints from OpenID Connect discovery. For such applications, you need to configure endpoints manually.
89195

0 commit comments

Comments
 (0)