Skip to content

Commit cb1a6ca

Browse files
committed
Add JWT bearer grant docs
1 parent 7cedb13 commit cb1a6ca

File tree

3 files changed

+25
-21
lines changed

3 files changed

+25
-21
lines changed

en/includes/guides/authentication/configure-jwt-bearer-grant.md

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ To register a trusted token issuer:
3232
</tr>
3333
<tr>
3434
<td>Alias</td>
35-
<td>The name by which the trusted token issuer knows {{ product_name }}. The <code>aud</code> claim of the token should include the {{ product_name }} organization's issuer value. If the <code>aud</code> claim doesn't include the organization's issuer value, the system validates the alias value you assign here against the <code>aud</code> claim.</td>
35+
<td>The name by which the trusted token issuer knows {{ product_name }}. The <code>aud</code> claim of the token should include the {{ product_name }} organization's issuer value. If the <code>aud</code> claim doesn't include the organization's issuer value, the system validates the alias value you assign here against the <code>aud</code> claim. <br>
36+
Example: <code>https://third-party-token-issuers.io/oauth2/token</code></td>
37+
</td>
3638
</tr>
3739
</table>
3840

@@ -53,23 +55,19 @@ To register a trusted token issuer:
5355

5456
- **Use PEM certificate**: Upload or paste the public certificate of the trusted token issuer. The certificate should be in PEM format.
5557

56-
- **Use PEM certificate**: Upload or paste the public certificate of the trusted token issuer. The certificate should be in PEM format.
57-
58-
??? note "If you have a certificate in other formats such as `.crt`, `.cer` or `.der`, expand here to see how you can convert them to PEM format using [OpenSSL](https://www.openssl.org/){:target="_blank"}"
59-
**Convert CRT to PEM**
60-
```bash
61-
openssl x509 -in cert.crt -out cert.pem
62-
58+
??? note "If you have a certificate in other formats such as `.crt`, `.cer` or `.der`, expand here to see how you can convert them to PEM format using [OpenSSL](https://www.openssl.org/){:target="_blank"}"
59+
**Convert CRT to PEM**
60+
```bash
61+
openssl x509 -in cert.crt -out cert.pem
62+
```
63+
**Convert CER to PEM:**
64+
```bash
65+
openssl x509 -in cert.cer -out cert.pem
66+
```
67+
**Convert DER to PEM:**
68+
```bash
69+
openssl x509 -in cert.der -out cert.pem
6370
```
64-
**Convert CER to PEM:**
65-
```bash
66-
openssl x509 -in cert.cer -out cert.pem
67-
```
68-
69-
**Convert DER to PEM:**
70-
```bash
71-
openssl x509 -in cert.der -out cert.pem
72-
```
7371

7472
5. Click **Finish** to add the new trusted token issuer.
7573

@@ -79,7 +77,7 @@ To register a trusted token issuer:
7977
You need to register [Standard-based OIDC application]({{base_path}}/guides/applications/register-standard-based-app/) application types with WSO2 Identity Server.
8078

8179

82-
To enable token exchange in your application:
80+
To enable JWT bearer grant in your application:
8381

8482
1. On the {{ product_name }} Console, go to **Applications**.
8583

@@ -94,7 +92,11 @@ To enable token exchange in your application:
9492
Follow the steps given below.
9593

9694
1. Obtain the JWT token received from the third-party token issuer.
97-
2. Execute the following cURL command to exchange the third-party token for an {{ product_name }} token.
95+
2. The application sends the access request to the token endpoint in WSO2 Identity Server with the following:
96+
- JWT bearer grant type.
97+
- `JWT assertion` that is created by the third-party token issuer.
98+
- Service provider's `client ID` and `client secret`.
99+
3. Execute the following cURL command to exchange the third-party token for an {{ product_name }} token.
98100

99101
```bash
100102
curl -v -k -X POST {{base_url}}/oauth2/token \
@@ -114,4 +116,5 @@ Upon successful execution, you will receive the exchanged token issued by {{ pro
114116
enable_iat_validation="true"
115117
iat_validity_period=30
116118
```
117-
119+
120+
Refer [JWT Bearer grant]({{base_path}}/references/grant-types/#jwt-bearer-grant) for more information on how the flow works.

en/includes/guides/authentication/configure-token-exchange.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,4 @@ Follow the steps given below.
189189
{{ product_name }} only copies the `sub` claim from the token received from the trusted token issuer to the exchanged {{ product_name }} token.
190190

191191
Upon successful execution, you will receive the exchanged token issued by {{ product_name }}.
192+

en/includes/references/grant-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ The following diagram shows how the token exchange grant flow works.
432432
6. The client application can now request resources from the resource server by providing the access token.
433433
7. As the resource server trusts {{ product_name }} issued tokens, it returns the requested resources to the client application.
434434

435-
See [configure the token exchange flow]({{base_path}}/guides/authentication/configure-token-exchange) for more details.
435+
Token exchange can be used for delegation and impersonation use cases. See [configure the token exchange flow]({{base_path}}/guides/authentication/configure-token-exchange) for more details about delegation usecase. See [user impersonation]({{base_path}}/guides/authorization/user-impersonation/via-business-application) for more details on user impersonation with token exchange grant.
436436

437437
{% if product_name == "WSO2 Identity Server" %}
438438

0 commit comments

Comments
 (0)