- mvn clean install
- Add the jar @ /opt/keycloak/providers/ in keycloak
- Now modify direct grant flow to add only username and sa-otp authenticator. Direct flow would look like below-
- Create a user and fetch the token with below command, example below: curl -d "client_id=directtestsa1" -d "username=pras" -d "password=password" -d "otp=1234" -d "grant_type=password" "http://localhost:8180/realms/SA/protocol/openid-connect/token"
- Authenticator has hard coded check for value 1234, if there's any other value you get 401, example below: curl -d "client_id=directtestsa1" -d "username=pras" -d "password=password" -d "otp=12345" -d "grant_type=password" "http://localhost:8180/realms/SA/protocol/openid-connect/token"
-
Notifications
You must be signed in to change notification settings - Fork 0
prasanna4742/keycloak-custom-authenticaor
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published