Skip to content

Commit bba1170

Browse files
Merge pull request #222 from AdobeDocs/enterprise_web_app
Enterprise web app
2 parents ba81943 + 482b4e9 commit bba1170

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

src/pages/guides/authentication/AdminAuthentication/samples.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,30 @@
22

33
The following guide contains code samples in NodeJS, Python, and Java that can be used to verify the parameters in the redirect.
44

5-
<InlineAlert slots="text"/>
6-
7-
Note: Always verify the `state`, `nonce`, and signature of the ID token on the backend. Do not expose this logic client-side.
8-
5+
All of the code samples on this page assume that the user's session id is stored in browser cookies (`Secure`, `HttpOnly`, and `SameSite=Strict`). Therefore, the session id will be easily available to the backend server because the browser will send the cookies in redirect request.
96

107
<InlineAlert slots="text"/>
118

12-
All code samples assume that the user's session ID is stored in browser cookies. Therefore when Adobe IMS redirects back to the partner app, the backend server of the partner app receives a HTTP request with the cookies from the user's browser and can identify the user's session.
9+
Note: Always verify the `state`, `nonce`, and signature of the ID token on the backend. Do not expose this logic client-side.
1310

1411
+ [NodeJS](#nodejs)
15-
+ [Install the required packages](#install-the-required-packages)
16-
+ [Verify the redirect](#verify-the-redirect)
12+
+ [Install NodeJS packages](#install-nodejs-packages)
13+
+ [Verify the redirect - NodeJS](#verify-the-redirect---nodejs)
1714
+ [Python](#python)
18-
+ [Install the required packages](#install-the-required-packages-1)
19-
+ [Verify the redirect](#verify-the-redirect-1)
15+
+ [Install Python packages](#install-python-packages)
16+
+ [Verify the redirect - Python](#verify-the-redirect---python)
2017
+ [Java](#java)
2118
+ [Add these dependencies to your pom.xml](#add-these-dependencies-to-your-pomxml)
22-
+ [Verify the redirect](#verify-the-redirect-2)
23-
19+
+ [Verify the redirect - Java](#verify-the-redirect---java)
2420

2521
## NodeJS
2622

27-
### Install the required packages
23+
### Install NodeJS packages
2824
```bash
2925
npm install jsonwebtoken axios jose
3026
```
3127

32-
### Verify the redirect
28+
### Verify the redirect - NodeJS
3329

3430
```js
3531
const axios = require('axios');
@@ -127,12 +123,12 @@ async function getPublicKeyFromJwk(jwk) {
127123
128124
## Python
129125
130-
### Install the required packages
126+
### Install Python packages
131127
```bash
132128
pip install pyjwt requests cryptography
133129
```
134130
135-
### Verify the redirect
131+
### Verify the redirect - Python
136132
137133
```python
138134
import requests
@@ -229,7 +225,7 @@ if __name__ == "__main__":
229225

230226
```
231227
232-
### Verify the redirect
228+
### Verify the redirect - Java
233229
234230
```java
235231
import com.auth0.jwk.Jwk;
2.91 KB
Loading

0 commit comments

Comments
 (0)