keycloak
Open Source Identity and Access Management.
Steps setup realm
Toggle line numbers
1 wget https://github.com/keycloak/keycloak/releases/download/14.0.0/keycloak-14.0.0.zip
2 unzip -t keycloak-14.0.0.zip
3 unzip keycloak-14.0.0.zip
4 cd ~/keycloak-14.0.0/bin
5 sh standalone.sh
6 http://localhost:8080/auth
7 # admin admin admin create
8 # http://localhost:8080/auth/admin/master/console/#/realms/master
9 # Master, add realm, MyRealm , create
10 # Users, add user, myuser
11 # select user, credentials, mypwd mypwd, temporary off
12 # Add role USER to MyRealm
13 # Make user myuser have role USER
14 # signout
15 # http://localhost:8080/auth/realms/MyRealm/account/
16 # realm: MyRealm
17 # user pwd: myuser mypwd
18 # client id: curl_confidential
19 # protocol: openid-connect
20 # Curl_confidential settings: access-type confidential
21 # valid redirect url http://localhost:8080
22 # tab credentials: regenerate secret 6dfe5f84-d115-4d3e-8a56-a0fcf5b2f13e
23 curl -d 'client_id=curl_confidential' -d 'client_secret=6dfe5f84-d115-4d3e-8a56-a0fcf5b2f13e' -d 'username=myuser' -d 'password=mypwd' -d 'grant_type=password' 'http://localhost:8080/auth/realms/MyRealm/protocol/openid-connect/token'