Keycloak on Docker & First Setup

First, What is Keycloak ?

Keycloak is an open source Identity and Access Management solution targeted towards modern applications and services.

Start Keycloak

docker run -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin quay.io/keycloak/keycloak:12.0.3 

Realm

We need to create our custom Realm.

Role

After created realm, we have to need roles for incoming users.

Client

Now we’ll navigate to the Clients page. And click the ‘Create’ button.

After created client, we have to specify at least one ‘Valid Redirect URL’ that will use this client for authentication.

Example: http://localhost:8081/*

User

User — Credentials

User — Role Mapping

After all these configurations, let’s check it is working properly;

Test

Request must be like;

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store