首先让我告诉大家,我对KeyCloak身份验证很新。在我们的应用程序中,它需要登录到应用程序而不要求用户在Keycloak登录表单中输入用户名和密码。我可以使用下面的api:
获取access_token,refresh-token,session-state/auth/realms/{realms-name}/protocol/openid-connect/token
现在我如何使用检索到的令牌直接让用户登录。
Login flow would be:
1. We will provide a unique url to each user.
2. User will hit that url on browser.
3. App will identify the user from the unique url and retrieve his/her username and password from the db.
4. Using the username and password the app will make above api call to get the access_token and then redirect user to some url with the access_token to get it authenticated directly.
所以,具体来说,我想知道我们是否有这样的网址,我们可以传递访问令牌并让用户直接登录。