Skip to content
Snippets Groups Projects
Verified Commit 06406854 authored by Mark's avatar Mark
Browse files

Add README and refactor

parent 64193559
No related branches found
No related tags found
1 merge request!5Service Integration
......@@ -139,7 +139,6 @@ behave-integration:
URLS_CONSENT: "http://172.17.0.4:5001/" # 172.17.0.4 -> consent
URLS_SELF_ISSUER: "http://172.17.0.5:4444/" # 172.17.0.5 -> hydra
HYDRA_ADMIN_URL: "http://172.17.0.5:4445"
BASE_URL: "http://172.17.0.5:4444"
ACCESS_TOKEN_URL: "http://172.17.0.5:4444/oauth2/token"
AUTHORIZE_URL: "http://172.17.0.5:4444/oauth2/auth"
USERINFO_URL: "http://172.17.0.5:4444/userinfo"
......
This is a test application to verify that all of the components provided in this repository
work together according to [OpenID Connect Standards](https://openid.net/developers/specs/)
Before running the application with `flask run --port=????`, make sure you export the following
environment variables with values according to your setup.
```
export URLS_SELF_ISSUER=http://sso.oas.example.net:4444/ # Hydra public API Base
export ACCESS_TOKEN_URL=http://sso.oas.example.net:4444/oauth2/token # Hydra token endpoint
export LOGOUT_URL=http://sso.oas.example.net:4444/oauth2/sessions/logout # Hydra logout endpoint
export AUTHORIZE_URL=http://sso.oas.example.net:4444/oauth2/auth # Hydra authentication endpoint
export USERINFO_URL=http://sso.oas.example.net:4444/userinfo # Hydra OpenID Connect userinfo endpoint
export KEY=testapplication # name of your oauth/openID Connect client (application)
export SECRET=clientsecret # secret of yout oauth/openID Connect client (application)
```
Also, don't forget to install requirements.
```
virtualenv venv
. venv/bin/activate
pip3 install -r requrements.txt
```
Navigate to `localhost:port/` to trigger the openID connect authentication flow. During the login
process your agent's browser will be redirected multiple times. If successful, you will see a
json reply containing your oAuth token.
Navigate to `localhost:port/userinfo` after you received the token to pull userinfo via openID
Connect scopes.
......@@ -6,7 +6,7 @@ from flask_oauthlib.client import OAuth
import uuid
BASE_URL=environ["BASE_URL"]
BASE_URL=environ["URLS_SELF_ISSUER"]
ACCESS_TOKEN_URL=environ["ACCESS_TOKEN_URL"]
LOGOUT_URL=environ["LOGOUT_URL"]
AUTHORIZE_URL=environ["AUTHORIZE_URL"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment