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
Discussions about this topic:
Golang client package:
-
Enable OpenID connect support for
golang.org/x/oauth2
by usinggithub.com/coreos/go-oidc
Protected endpoints by using OathKeeper, all requests come to these APIs must be authenticated.