mirror of
https://codeberg.org/pfzetto/axum-oidc
synced 2025-12-09 22:55:17 +01:00
improved example setup
This commit is contained in:
parent
57f4e76281
commit
ed7e8f5528
3 changed files with 7 additions and 2 deletions
1
examples/basic/.gitignore
vendored
1
examples/basic/.gitignore
vendored
|
|
@ -2,3 +2,4 @@
|
||||||
keycloak_example/keycloak_data/*
|
keycloak_example/keycloak_data/*
|
||||||
!keycloak_example/keycloak_data/keep
|
!keycloak_example/keycloak_data/keep
|
||||||
.idea
|
.idea
|
||||||
|
target
|
||||||
|
|
@ -4,6 +4,7 @@ This is an exmple using Keycloak as the OIDC provider.
|
||||||
|
|
||||||
Steps for statring the service and adding an account:
|
Steps for statring the service and adding an account:
|
||||||
- starting keycloak: `docker-compose -f keycloak/docker-compose.yml up`
|
- starting keycloak: `docker-compose -f keycloak/docker-compose.yml up`
|
||||||
|
- go to `http://localhost:8989` in your browser and login with admin/admin
|
||||||
- create a new realm in keycloak
|
- create a new realm in keycloak
|
||||||
- create a new client in the realm
|
- create a new client in the realm
|
||||||
- add an account in the realm
|
- add an account in the realm
|
||||||
|
|
@ -13,7 +14,10 @@ Steps for attaching the application to the OIDC provider:
|
||||||
- copy the `.env.example` file to `.env`
|
- copy the `.env.example` file to `.env`
|
||||||
- generate your issuers IP (localhost in this case): `hostname -I | awk '{print $1}'` (THIS MAY CHANGE DEPENDING ON YOUR NETWORK)
|
- generate your issuers IP (localhost in this case): `hostname -I | awk '{print $1}'` (THIS MAY CHANGE DEPENDING ON YOUR NETWORK)
|
||||||
- set the `ISSUER` in the `.env` file to the IP
|
- set the `ISSUER` in the `.env` file to the IP
|
||||||
- set the `CLIENT_ID` in the `.env` file to the client id of the client you created in keycloak
|
- set the `CLIENT_ID` in the `.env` file to the client id of the client you created in keycloak (found under `Credentials`)
|
||||||
|
- set the URL as sen below (VERY BAD PRACTICE, DO NOT DO THIS IN PRODUCTION)
|
||||||
- set the `CLIENT_SECRET` in the `.env` file to the client secret of the client you created in keycloak
|
- set the `CLIENT_SECRET` in the `.env` file to the client secret of the client you created in keycloak
|
||||||
|
- set the `APP_URL` in the `.env` file to `http://localhost:8080`
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
BIN
examples/basic/img.png
Normal file
BIN
examples/basic/img.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
Loading…
Add table
Add a link
Reference in a new issue