Skip to content
Snippets Groups Projects
README.md 1.51 KiB
Newer Older
Mark's avatar
Mark committed
# Install

> THIS IS JUST A DEMO REPO. IT WORKS ON LOCALHOST ONLY

Clone the repo and make sure to also fetch the submodules.
```
git submodule init
git submodule update
```
Refer to the [hydra install guide](https://www.ory.sh/docs/next/hydra/5min-tutorial) to get the demo running. Change the following values in the quickstart.yml file before starting hydra with docker-compose.

```
   - URLS_SELF_ISSUER=http://oas.example.net:4444
      - URLS_CONSENT=http://127.0.0.1:5001/consent
      - URLS_LOGIN=http://127.0.0.1:5000/login
      - URLS_LOGOUT=http://127.0.0.1:5000/logout
      - DSN=memory
      - SECRETS_SYSTEM=youReallyNeedToChangeThis
      - OIDC_SUBJECT_TYPES_SUPPORTED=public,pairwise
      - OIDC_SUBJECT_TYPE_PAIRWISE_SALT=youReallyNeedToChangeThis
    restart: unless-stopped

  consent:
    environment:
      - HYDRA_ADMIN_URL=http://127.0.0.1:4445
```

After Hydra is up and running, start the login provider
```
cd login_provider
source .env/bin/activate
pip3 install -r requirements.txt
flask run --port 5000
```
and the consent provider
```
cd consent_provider
source .env/bin/activate
pip3 install -r requirements.txt
flask run --port 5001
```

# Using SSO
To use SSO configure your oAuth client (for example netxtcloud) and create a new oAuth client object. To create the client object, please also refer to the ORY Hydra documentation.

To configure your client refer to  `127.0.0.1:4444/.well-known/openid-configuration`.

The username and password of the demo user can be found in the login_provider app.py file.