KEYCLOAK-1960
This commit is contained in:
parent
9cf4186eb2
commit
181fdeb0d0
2 changed files with 33 additions and 2 deletions
|
@ -46,6 +46,14 @@ public interface UserResource {
|
||||||
@Path("reset-password")
|
@Path("reset-password")
|
||||||
public void resetPassword(CredentialRepresentation credentialRepresentation);
|
public void resetPassword(CredentialRepresentation credentialRepresentation);
|
||||||
|
|
||||||
|
@PUT
|
||||||
|
@Path("reset-password-email")
|
||||||
|
public void resetPasswordEmail();
|
||||||
|
|
||||||
|
@PUT
|
||||||
|
@Path("reset-password-email")
|
||||||
|
public void resetPasswordEmail(@QueryParam("client_id") String clientId);
|
||||||
|
|
||||||
@PUT
|
@PUT
|
||||||
@Path("execute-actions-email")
|
@Path("execute-actions-email")
|
||||||
public void executeActionsEmail(List<String> actions);
|
public void executeActionsEmail(List<String> actions);
|
||||||
|
|
|
@ -882,15 +882,38 @@ public class UsersResource {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a password-reset email to the user
|
* Send an email to the user with a link they can click to reset their password.
|
||||||
|
* The redirectUri and clientId parameters are optional. The default for the
|
||||||
|
* redirect is the account client.
|
||||||
*
|
*
|
||||||
* An email contains a link the user can click to reset their password.
|
* @param id
|
||||||
|
* @param redirectUri redirect uri
|
||||||
|
* @param clientId client id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Path("{id}/reset-password-email")
|
||||||
|
@PUT
|
||||||
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
|
public Response resetPasswordEmail(@PathParam("id") String id,
|
||||||
|
@QueryParam(OIDCLoginProtocol.REDIRECT_URI_PARAM) String redirectUri,
|
||||||
|
@QueryParam(OIDCLoginProtocol.CLIENT_ID_PARAM) String clientId) {
|
||||||
|
List<String> actions = new LinkedList<>();
|
||||||
|
actions.add(UserModel.RequiredAction.UPDATE_PASSWORD.name());
|
||||||
|
return executeActionsEmail(id, redirectUri, clientId, actions);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send a update account email to the user
|
||||||
|
*
|
||||||
|
* An email contains a link the user can click to perform a set of required actions.
|
||||||
* The redirectUri and clientId parameters are optional. The default for the
|
* The redirectUri and clientId parameters are optional. The default for the
|
||||||
* redirect is the account client.
|
* redirect is the account client.
|
||||||
*
|
*
|
||||||
* @param id User is
|
* @param id User is
|
||||||
* @param redirectUri Redirect uri
|
* @param redirectUri Redirect uri
|
||||||
* @param clientId Client id
|
* @param clientId Client id
|
||||||
|
* @param actions required actions the user needs to complete
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Path("{id}/execute-actions-email")
|
@Path("{id}/execute-actions-email")
|
||||||
|
|
Loading…
Reference in a new issue