1. Generate OTP token provided with username via keycloak rest api, 2. Calling 2nd api to provided with OTP token and get JWT token

Skip to first unread message

Noman Ali

Oct 28, 2022, 11:12:16 AM10/28/22
to Keycloak Dev
   I am developing an application where I need to secure my rest services.

  This is already working on my machine.
  1. Setup realm and client
  2. Created two users one with admin role and one with user role
  3. I am able to call the keycloak rest api with userid / password 
  4. Point 3 will return me the JWT token, which I can use to access my rest services
I just want to point no 3 will be changed as follow:
      3. I want to call a keycloak api with userid and it will generate a OTP token and send it to userid email address or/and mobile no
      3a. Now in next call, user take that OTP token and call a keycloak service with userid/OTP token to get the JWT token
      4. Point 3a will return the JWT token, which can be used to access my rest services

Noman Ali

Oct 28, 2022, 11:41:26 AM10/28/22
to Keycloak Dev
I really appreciate if someone will help me or guide me to the link which has similar example.
Reply all
Reply to author
0 new messages