Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing body options in requesting password change ticket #351

Closed
Matthew-Nwen opened this issue Apr 21, 2021 · 1 comment · Fixed by #352
Closed

Missing body options in requesting password change ticket #351

Matthew-Nwen opened this issue Apr 21, 2021 · 1 comment · Fixed by #352
Labels
feature request A feature has been asked for or suggested by the community

Comments

@Matthew-Nwen
Copy link

Describe the problem you'd like to have solved

According to the Auth0 documentation, the endpoint to request a password change should be able to take two additional arguments.

  1. client_id: ID of the client used to redirect to the default login route of the corresponding application.
  2. includeEmailInRedirect: flag for whether or not to include the email in the redirect.

Currently, this library does not support passing either argument.

Describe the ideal solution

The solution to remedy this problem would be to add in two fields and corresponding setters to the PasswordTicketChange class.

For the required fields, the following code should be added to the property definitions of class:

@JsonProperty("client_id")
private String clientId;
@JsonProperty("includeEmailInRedirect")
private Boolean includeEmailInRedirect;

For the setters, the following code should be added:

/**
 * Setter for the client id to redirect to the default login route of the corresponding application.
 *
 * @param  clientId the ID of the client
 */
@JsonProperty("client_id")
public void setClientId(String clientId){
    this.clientId = clientId;
}

/**
 * Setter for whether to include the email address as part of the returnUrl in the reset_email (true) or not (false).
 *
 * @param includeEmailInRedirect true if email address is included as part of the returnUrl in the reset_email, false if not
 */
@JsonProperty("includeEmailInRedirect")
public void setIncludeEmailInRedirect(Boolean includeEmailInRedirect) {
    this.includeEmailInRedirect = includeEmailInRedirect;
}

Alternatives and current work-arounds

Currently, there is no work-around to hit this endpoint with the missing properties using this library. However, one could just call the endpoint directly with a POST request and appropriate JSON.

@Matthew-Nwen Matthew-Nwen added the feature request A feature has been asked for or suggested by the community label Apr 21, 2021
@jimmyjames
Copy link
Contributor

👍 Thanks for raising this! We'll get a PR out soon to support this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A feature has been asked for or suggested by the community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants