Traefik + oauth2-proxy + keycloak authentification example.
Need to install Docker or Podman and docker-compose.
- run 
docker-compose up keycloak - open http://localhost:8082 in a broswer
 - login to the keycloak using name admin and password admin
 - create oauth2-proxy client with options:
- Client authentication: 
On - Valid redirect URIs: 
* 
 - Client authentication: 
 - copy the Client Secret value from the page Credentials to the property client_secret in the file 
oauth2-proxy/config.toml - create user with parameters:
- Email verified: 
Yes - Username: 
traefik - Email: 
[email protected] - First name: 
traefik - Last name: 
traefik 
 - Email verified: 
 - set password on the page Credentials of the user:
- Password: 
traefik - Password Confirmation: 
traefik - Temporary: 
Off 
 - Password: 
 - run 
docker compose stop - run 
docker compose up - wait for all services to start
 - open http://localhost:7070/bearer in the browser
 - sign in using username traefik and password traefik
 - you should see json response with parameter 
authenticated=trueandtokenthat can be parsed at https://jwt.io