简体   繁体   English

在keycloak中如何更改经过身份验证的用户的密码

[英]in keycloak how to change the password of an authenticated user

In the keycloak administration, if I set the "Required User Action" of a user to "Update Password".在密钥斗篷管理中,如果我将用户的“所需用户操作”设置为“更新密码”。 The user is asked for a new password after a successful login, calling:成功登录后要求用户输入新密码,调用:

https://SERVER/auth/realms/REALM/login-actions/required-action?execution=UPDATE_PASSWORD&client_id=CLIENT_ID&tab_id=TAB_ID https://SERVER/auth/realms/REALM/login-actions/required-action?execution=UPDATE_PASSWORD&client_id=CLIENT_ID&tab_id=TAB_ID

Calling this URL with a user logged-in but not configured "Update Password" I get a message "User is already logged in".在用户登录但未配置“更新密码”的情况下调用此 URL 我收到一条消息“用户已登录”。

What would be the correct URL to call from an external application, eg from a menu with actions edit-profile, change-password...从外部应用程序调用的正确 URL 是什么,例如从具有操作编辑配置文件、更改密码的菜单...

Edit : In our application we authenticate users managed in keycloak.编辑:在我们的应用程序中,我们验证在 keycloak 中管理的用户。 We would like to be able to link a keycloak page (similar as the one posted) where the user can update/change his password (eg old-pw, new-pw, confirm-pw).我们希望能够链接一个 keycloak 页面(类似于发布的页面),用户可以在其中更新/更改他的密码(例如 old-pw、new-pw、confirm-pw)。

This answer is based on Keycloak 12 (latest version at the time of writing the answer)此答案基于 Keycloak 12(撰写答案时的最新版本)

You can ask users to change their profile details or passwords from the manage account section.您可以要求用户从管理帐户部分更改他们的个人资料详细信息或密码。 You can get the URL of that screen and direct users to that.您可以获得该屏幕的 URL 并将用户引导至该屏幕。

"manage account" link location “管理帐户”链接位置

Account management screen账户管理画面

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM