Proof of concept for integration between kratos and hydra
Run this POC
Start docker-compose stack
$ make start-all
A login and consent app will be served at http://127.0.0.1:4455/
Create the first Hydra client
$ make create-hydra-client
Start an exemplary client to perform OAuth2 Authorization Code flow.
$ make examine-authorization-code
Visit the client at http://127.0.0.1:5555
From here, if we access http://127.0.0.1:5555/mock/api
, it will print out all the headers.
It also contains some custom headers which are produced from Oathkeeper like:
Authorization: bear ...
X-User-ID: ...
It is quite easy to add more custom header if you want.
Rebuild and update UI service:
$ make update-ui
Clean example:
$ make clean-all
My personal docs for this example
OIDC and Hydra
Kratos configuration
Discussions about this topic:
References, libs and packages
Cookies vs Tokens
Golang client package:
Protected endpoints by using OathKeeper, all requests come to these APIs must be authenticated.
How to ...