https://github.com/apis/hydra-example
https://github.com/apis/hydra-example
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/apis/hydra-example
- Owner: apis
- Created: 2021-02-17T13:22:38.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-17T15:49:55.000Z (over 5 years ago)
- Last Synced: 2025-05-29T14:17:39.722Z (about 1 year ago)
- Language: Go
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hydra-example
### 1. Download latest Hydra with SQLite DB
https://github.com/ory/hydra/releases/
Code in this repo was tested with following version:
~~~~
hydra_1.9.2-sqlite_linux_64bit.tar.gz
~~~~
### 2. Unzip hydra archive into 'hydra' subfolder
### 3. Run initial migration
~~~~
hydra/hydra migrate sql sqlite://./hydra/db.sqlite?_fk=true
~~~~
### 4. Start Hydra
~~~~
./run_hydra.sh
~~~~
### 5. Create client
~~~~
hydra/hydra clients create \
--endpoint http://localhost:4445 \
--id scum-client \
--secret secret \
--token-endpoint-auth-method client_secret_post \
--grant-types authorization_code,refresh_token \
--response-types code,id_token \
--scope openid,offline \
--callbacks http://localhost:5555/callback
~~~~
### 6. Build and run idp-example
~~~~
cd idp-example
go build main.go
./main
~~~~
### 7. Build and run oid-client
~~~~
cd oid-client
go build app.go
./app
~~~~
### 8. Open URL http://localhost:5555/ in your browser
Login name and password should match (why not? we are in security bussiness after all!)