commit
19ad846306
2 changed files with 47 additions and 2 deletions
|
@ -46,6 +46,24 @@ public interface UserResource {
|
|||
@Path("reset-password")
|
||||
public void resetPassword(CredentialRepresentation credentialRepresentation);
|
||||
|
||||
/**
|
||||
* Use executeActionsEmail and pass in the UPDATE_PASSWORD required action
|
||||
*
|
||||
*/
|
||||
@PUT
|
||||
@Path("reset-password-email")
|
||||
@Deprecated
|
||||
public void resetPasswordEmail();
|
||||
|
||||
/**
|
||||
* Use executeActionsEmail and pass in the UPDATE_PASSWORD required action
|
||||
*
|
||||
*/
|
||||
@PUT
|
||||
@Path("reset-password-email")
|
||||
@Deprecated
|
||||
public void resetPasswordEmail(@QueryParam("client_id") String clientId);
|
||||
|
||||
@PUT
|
||||
@Path("execute-actions-email")
|
||||
public void executeActionsEmail(List<String> actions);
|
||||
|
|
|
@ -928,15 +928,42 @@ 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.
|
||||
* This endpoint has been deprecated. Please use the execute-actions-email passing a list with
|
||||
* UPDATE_PASSWORD within it.
|
||||
*
|
||||
* @param id
|
||||
* @param redirectUri redirect uri
|
||||
* @param clientId client id
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
@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
|
||||
* redirect is the account client.
|
||||
*
|
||||
* @param id User is
|
||||
* @param redirectUri Redirect uri
|
||||
* @param clientId Client id
|
||||
* @param actions required actions the user needs to complete
|
||||
* @return
|
||||
*/
|
||||
@Path("{id}/execute-actions-email")
|
||||
|
|
Loading…
Reference in a new issue