Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/embesozzi/oidc-check-session-iframe
Simple html page for implementing check session iframe based on OpenID Connect Session Management 1.0
https://github.com/embesozzi/oidc-check-session-iframe
iframe oauth2 oidc session-management
Last synced: 19 days ago
JSON representation
Simple html page for implementing check session iframe based on OpenID Connect Session Management 1.0
- Host: GitHub
- URL: https://github.com/embesozzi/oidc-check-session-iframe
- Owner: embesozzi
- Created: 2021-02-15T13:26:43.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-15T19:19:36.000Z (almost 4 years ago)
- Last Synced: 2024-11-21T09:12:05.232Z (3 months ago)
- Topics: iframe, oauth2, oidc, session-management
- Language: HTML
- Homepage:
- Size: 146 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# oidc-check-session-iframe
Simple html page that implements check session flow based on [OpenID Connect Session Management](https://openid.net/specs/openid-connect-session-1_0.html).
1. Relay Party adds a hidden iFrame pointing to OP's ```check_session_iframe```.
2. Relay Party iframe polls the OP iframe with postMessage with format ```Client ID + " " + Session State```.
3. Relay Party receives the postMessage back from the OP iframe with the app session status.## Configure
### Adjust OpenID Provider and App settings
Go to the file `index.html` and change the config variables values, for example:
```javascript
var config = {
opCheckSessionIframe : "http://localhost:8080/auth/realms/master/protocol/openid-connect/login-status-iframe.html",
opAuthEndpoint: "http://localhost:8080/auth/realms/master/protocol/openid-connect/auth",
opOriginDomain : "http://localhost:8080",
appClientId : "test",
appRedirectUri : "http://localhost"
}
```
## Build and run### Launch the demo application
Just run the `update.sh` script. It will build the app image based on `nginx:alpine` and will expose the app in the port 80.
* http://localhost
![App home](screenshot-1.png)