简体   繁体   中英

Keycloak 18 change user password and email

I need to allow users to change their email address and password directly from my application.

Is it possible to implement this with the following Java library?

<dependency>
    <groupId>org.keycloak</groupId>
    <artifactId>keycloak-admin-client</artifactId>
    <version>18.0.2</version>
</dependency>

Could you please show an example?

You can use function from UserResource class to reset the selected user password

resetPassword(CredentialRepresentation credentialRepresentation)

As you can see it takes on CredentialRepresentation, that is the class in which you need to instantiate the object to hold the credential information so that keycloak can use.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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