Skip to content

Latest commit

 

History

History
378 lines (276 loc) · 14.2 KB

File metadata and controls

378 lines (276 loc) · 14.2 KB

Password

7 operation(s). Part of the API index.

Call these as client.<service>.<method>(...). <service> is the client field for this group — the README lists the field name for every service. These pages group operations the way the OpenAPI specification tags them, which is not always one field per page.


changePassword

PUT /identity/v2/auth/password/change

Update Password

Updates the Account Password using the current Password for verification.

Example

public static void callChangePassword(LoginRadiusClient client) {
  ChangePassword changePassword = new ChangePassword().oldPassword("<oldPassword>").newPassword("<newPassword>"); //Required
  String gRecaptchaResponse = "<gRecaptchaResponse>"; //Optional
  String gRecaptchaResponse2 = "<gRecaptchaResponse2>"; //Optional
  Boolean preventWebhook = true; //Optional
  Boolean xPreventWebhook = true; //Optional
  String hCaptchaResponse = "<hCaptchaResponse>"; //Optional
  String qqCaptchaTicket = "<qqCaptchaTicket>"; //Required
  String qqCaptchaRandstr = "<qqCaptchaRandstr>"; //Required
  String accessToken = "<accessToken>"; //Optional

  try {
    var response = client.password.changePassword(changePassword, gRecaptchaResponse, gRecaptchaResponse2, preventWebhook, xPreventWebhook, hCaptchaResponse, qqCaptchaTicket, qqCaptchaRandstr, accessToken);
    System.out.println(response);
  } catch (ApiException e) {
    LoginRadiusException lr = LoginRadiusClient.toLoginRadiusException(e);
    System.err.println(lr.description());
  }
}

Parameters

Name In Type Required Description
g-recaptcha-response query string no Google reCAPTCHA response parameter which will be sent to the server for verification.
g_recaptcha_response query string no Google reCAPTCHA Response
prevent_webhook query boolean no When true, suppresses webhook events for this operation.
X-PreventWebhook header boolean no When true, suppresses webhook events for this operation.
h-captcha-response query string no hCaptcha Response
qq_captcha_ticket query string no QQ Captcha ticket (required if Bot Protection is enabled)
qq_captcha_randstr query string no QQ Captcha rand string (required if Bot Protection is enabled)
access_token query string no Access Token of the User

Request body

changePassword as application/json.

Returns

IsPostedResponse


forgotPassword

POST /identity/v2/auth/password

Forgot Password

Initiates the Password recovery process using Username or Email.

Example

public static void callForgotPassword(LoginRadiusClient client) {
  String emailtemplate = "<emailtemplate>"; //Optional
  String resetpasswordurl = "<resetpasswordurl>"; //Optional
  Boolean preventWebhook = true; //Optional
  Boolean xPreventWebhook = true; //Optional
  String gRecaptchaResponse = "<gRecaptchaResponse>"; //Optional
  String gRecaptchaResponse2 = "<gRecaptchaResponse2>"; //Optional
  String qqCaptchaTicket = "<qqCaptchaTicket>"; //Optional
  String qqCaptchaRandstr = "<qqCaptchaRandstr>"; //Optional
  String hCaptchaResponse = "<hCaptchaResponse>"; //Optional
  ForgotPasswordRequest forgotPasswordRequest = new ForgotPasswordRequest().email("<email>").userName("<userName>").g-recaptcha-response("<g-recaptcha-response>"); //Optional

  try {
    var response = client.password.forgotPassword(emailtemplate, resetpasswordurl, preventWebhook, xPreventWebhook, gRecaptchaResponse, gRecaptchaResponse2, qqCaptchaTicket, qqCaptchaRandstr, hCaptchaResponse, forgotPasswordRequest);
    System.out.println(response);
  } catch (ApiException e) {
    LoginRadiusException lr = LoginRadiusClient.toLoginRadiusException(e);
    System.err.println(lr.description());
  }
}

Parameters

Name In Type Required Description
emailtemplate query string no Name of the Email template to use for this notification.
resetpasswordurl query string no Callback URL for the Password Reset link in the Email.
prevent_webhook query boolean no When true, suppresses webhook events for this operation.
X-PreventWebhook header boolean no When true, suppresses webhook events for this operation.
g-recaptcha-response query string no Google reCAPTCHA response parameter which will be sent to the server for verification.
g_recaptcha_response query string no Google reCAPTCHA Response
qq_captcha_ticket query string no QQ reCAPTCHA Response
qq_captcha_randstr query string no QQ reCAPTCHA Response
h-captcha-response query string no hCaptcha Response

Request body

object as application/json.

Returns

IsPostedResponse


requestOTPForPasswordReset

POST /identity/v2/auth/password/otp

Retrieve Password reset OTP

Requests an OTP for resetting the Password using the User's Phone number.

Example

public static void callRequestOTPForPasswordReset(LoginRadiusClient client) {
  ForgotPasswordPhoneModel forgotPasswordPhoneModel = new ForgotPasswordPhoneModel().phone("<phone>"); //Required
  String smstemplate = "<smstemplate>"; //Optional
  String gRecaptchaResponse = "<gRecaptchaResponse>"; //Optional
  String gRecaptchaResponse2 = "<gRecaptchaResponse2>"; //Optional
  String hCaptchaResponse = "<hCaptchaResponse>"; //Optional
  String qqCaptchaTicket = "<qqCaptchaTicket>"; //Required
  String qqCaptchaRandstr = "<qqCaptchaRandstr>"; //Required
  Boolean isvoiceotp = true; //Optional

  try {
    var response = client.password.requestOTPForPasswordReset(forgotPasswordPhoneModel, smstemplate, gRecaptchaResponse, gRecaptchaResponse2, hCaptchaResponse, qqCaptchaTicket, qqCaptchaRandstr, isvoiceotp);
    System.out.println(response);
  } catch (ApiException e) {
    LoginRadiusException lr = LoginRadiusClient.toLoginRadiusException(e);
    System.err.println(lr.description());
  }
}

Parameters

Name In Type Required Description
smstemplate query string no SMS Template
g-recaptcha-response query string no Google reCAPTCHA response parameter which will be sent to the server for verification.
g_recaptcha_response query string no Google reCAPTCHA Response
h-captcha-response query string no hCaptcha Response
qq_captcha_ticket query string no QQ Captcha ticket (required if Bot Protection is enabled)
qq_captcha_randstr query string no QQ Captcha rand string (required if Bot Protection is enabled)
isvoiceotp query boolean no Boolean flag to enforce sending SMS content via Voice.

Request body

ForgotPasswordPhoneModel as application/json.

Returns

SMSResponse


resetPassword

PUT /identity/v2/auth/password/reset

Reset Password with token and OTP

Sets a new Password for the specified Account using a reset token and OTP.

Example

public static void callResetPassword(LoginRadiusClient client) {
  ResetPassword resetPassword = new ResetPassword(); //Required
  String gRecaptchaResponse = "<gRecaptchaResponse>"; //Optional
  String gRecaptchaResponse2 = "<gRecaptchaResponse2>"; //Optional
  Boolean preventWebhook = true; //Optional
  Boolean xPreventWebhook = true; //Optional
  String hCaptchaResponse = "<hCaptchaResponse>"; //Optional
  String qqCaptchaTicket = "<qqCaptchaTicket>"; //Required
  String qqCaptchaRandstr = "<qqCaptchaRandstr>"; //Required

  try {
    var response = client.password.resetPassword(resetPassword, gRecaptchaResponse, gRecaptchaResponse2, preventWebhook, xPreventWebhook, hCaptchaResponse, qqCaptchaTicket, qqCaptchaRandstr);
    System.out.println(response);
  } catch (ApiException e) {
    LoginRadiusException lr = LoginRadiusClient.toLoginRadiusException(e);
    System.err.println(lr.description());
  }
}

Parameters

Name In Type Required Description
g-recaptcha-response query string no Google reCAPTCHA response parameter which will be sent to the server for verification.
g_recaptcha_response query string no Google reCAPTCHA Response
prevent_webhook query boolean no When true, suppresses webhook events for this operation.
X-PreventWebhook header boolean no When true, suppresses webhook events for this operation.
h-captcha-response query string no hCaptcha Response
qq_captcha_ticket query string no QQ Captcha ticket (required if Bot Protection is enabled)
qq_captcha_randstr query string no QQ Captcha rand string (required if Bot Protection is enabled)

Request body

ResetPassword as application/json.

Returns

ResetPasswordResponse


resetPasswordByResetToken

PUT /identity/v2/auth/password

Reset Password with token and OTP

Sets a new Password for the specified Account using a reset token and OTP.

Example

public static void callResetPasswordByResetToken(LoginRadiusClient client) {
  ResetPassword resetPassword = new ResetPassword(); //Required
  String gRecaptchaResponse = "<gRecaptchaResponse>"; //Optional
  String gRecaptchaResponse2 = "<gRecaptchaResponse2>"; //Optional
  Boolean preventWebhook = true; //Optional
  Boolean xPreventWebhook = true; //Optional
  String hCaptchaResponse = "<hCaptchaResponse>"; //Optional
  String qqCaptchaTicket = "<qqCaptchaTicket>"; //Required
  String qqCaptchaRandstr = "<qqCaptchaRandstr>"; //Required

  try {
    var response = client.password.resetPasswordByResetToken(resetPassword, gRecaptchaResponse, gRecaptchaResponse2, preventWebhook, xPreventWebhook, hCaptchaResponse, qqCaptchaTicket, qqCaptchaRandstr);
    System.out.println(response);
  } catch (ApiException e) {
    LoginRadiusException lr = LoginRadiusClient.toLoginRadiusException(e);
    System.err.println(lr.description());
  }
}

Parameters

Name In Type Required Description
g-recaptcha-response query string no Google reCAPTCHA response parameter which will be sent to the server for verification.
g_recaptcha_response query string no Google reCAPTCHA Response
prevent_webhook query boolean no When true, suppresses webhook events for this operation.
X-PreventWebhook header boolean no When true, suppresses webhook events for this operation.
h-captcha-response query string no hCaptcha Response
qq_captcha_ticket query string no QQ Captcha ticket (required if Bot Protection is enabled)
qq_captcha_randstr query string no QQ Captcha rand string (required if Bot Protection is enabled)

Request body

ResetPassword as application/json.

Returns

ResetPasswordResponse


resetPasswordSecurityAnswer

PUT /identity/v2/auth/password/securityanswer

Reset Password with security question

Resets the Password using a security question and Email, Username, or Phone.

Example

public static void callResetPasswordSecurityAnswer(LoginRadiusClient client) {
  Boolean preventWebhook = true; //Optional
  Boolean xPreventWebhook = true; //Optional
  ResetPasswordBySecurityAnswer resetPasswordBySecurityAnswer = new ResetPasswordBySecurityAnswer().securityAnswer("<securityAnswer>").password("<password>"); //Optional

  try {
    var response = client.password.resetPasswordSecurityAnswer(preventWebhook, xPreventWebhook, resetPasswordBySecurityAnswer);
    System.out.println(response);
  } catch (ApiException e) {
    LoginRadiusException lr = LoginRadiusClient.toLoginRadiusException(e);
    System.err.println(lr.description());
  }
}

Parameters

Name In Type Required Description
prevent_webhook query boolean no When true, suppresses webhook events for this operation.
X-PreventWebhook header boolean no When true, suppresses webhook events for this operation.

Request body

ResetPasswordBySecurityAnswer as application/json.

Returns

ResetPasswordResponse


resetPasswordWithOTP

PUT /identity/v2/auth/password/otp

Reset Password with Phone and OTP

Resets the Password using OTP and Phone number verification.

Example

public static void callResetPasswordWithOTP(LoginRadiusClient client) {
  ResetPasswordWithOTP resetPasswordWithOTP = new ResetPasswordWithOTP().password("<password>").otp("<otp>").phone("<phone>"); //Required
  String gRecaptchaResponse = "<gRecaptchaResponse>"; //Optional
  String gRecaptchaResponse2 = "<gRecaptchaResponse2>"; //Optional
  Boolean preventWebhook = true; //Optional
  Boolean xPreventWebhook = true; //Optional
  String hCaptchaResponse = "<hCaptchaResponse>"; //Optional
  String qqCaptchaTicket = "<qqCaptchaTicket>"; //Required
  String qqCaptchaRandstr = "<qqCaptchaRandstr>"; //Required

  try {
    var response = client.password.resetPasswordWithOTP(resetPasswordWithOTP, gRecaptchaResponse, gRecaptchaResponse2, preventWebhook, xPreventWebhook, hCaptchaResponse, qqCaptchaTicket, qqCaptchaRandstr);
    System.out.println(response);
  } catch (ApiException e) {
    LoginRadiusException lr = LoginRadiusClient.toLoginRadiusException(e);
    System.err.println(lr.description());
  }
}

Parameters

Name In Type Required Description
g-recaptcha-response query string no Google reCAPTCHA response parameter which will be sent to the server for verification.
g_recaptcha_response query string no Google reCAPTCHA Response
prevent_webhook query boolean no When true, suppresses webhook events for this operation.
X-PreventWebhook header boolean no When true, suppresses webhook events for this operation.
h-captcha-response query string no hCaptcha Response
qq_captcha_ticket query string no QQ Captcha ticket (required if Bot Protection is enabled)
qq_captcha_randstr query string no QQ Captcha rand string (required if Bot Protection is enabled)

Request body

ResetPasswordWithOTP as application/json.

Returns

ResetPasswordResponse