Skip to content

Instantly share code, notes, and snippets.

@rcapraro
Last active May 25, 2018 16:51
Show Gist options
  • Save rcapraro/ced8a86174a5ba3cf858e3115272930d to your computer and use it in GitHub Desktop.
Save rcapraro/ced8a86174a5ba3cf858e3115272930d to your computer and use it in GitHub Desktop.
Keycloak sandbox

Docker images

Postgres docker image

docker run --name postgres -e POSTGRES_DATABASE=keycloak -e POSTGRES_USER=keycloak -e POSTGRES_PASSWORD=password -e POSTGRES_ROOT_PASSWORD=root_password -d postgres

Keycloak docker image

docker run --name keycloak --link postgres:postgres -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin jboss/keycloak-postgres

Obtain a token

curl --data "grant_type=password&client_id=curl&username=richard&password=password" http://localhost:8080/auth/realms/master/protocol/openid-connect/token

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment