Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions src/FusionAuth/FusionAuthClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,15 +292,37 @@ public function checkChangePasswordUsingJWT($encodedJWT)
*
* An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.
*
* @param string $loginId The loginId of the User that you intend to change the password for.
* @param string $loginId The loginId (email or username) of the User that you intend to change the password for.
*
* @return ClientResponse The ClientResponse.
* @throws \Exception
*/
public function checkChangePasswordUsingLoginId($loginId)
{
return $this->start()->uri("/api/user/change-password")
->urlParameter("username", $loginId)
->urlParameter("loginId", $loginId)
->get()
->go();
}

/**
* Check to see if the user must obtain a Trust Request Id in order to complete a change password request.
* When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
* your password, you must obtain a Trust Request Id by completing a Two-Factor Step-Up authentication.
*
* An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.
*
* @param string $loginId The loginId of the User that you intend to change the password for.
* @param array $loginIdTypes The identity types that FusionAuth will compare the loginId to.
*
* @return ClientResponse The ClientResponse.
* @throws \Exception
*/
public function checkChangePasswordUsingLoginIdAndLoginIdTypes($loginId, $loginIdTypes)
{
return $this->start()->uri("/api/user/change-password")
->urlParameter("loginId", $loginId)
->urlParameter("loginIdTypes", $loginIdTypes)
->get()
->go();
}
Expand Down Expand Up @@ -4439,7 +4461,7 @@ public function retrieveUserByLoginId($loginId)
* Retrieves the user for the loginId, using specific loginIdTypes.
*
* @param string $loginId The email or username of the user.
* @param array $loginIdTypes the identity types that FusionAuth will compare the loginId to.
* @param array $loginIdTypes The identity types that FusionAuth will compare the loginId to.
*
* @return ClientResponse The ClientResponse.
* @throws \Exception
Expand Down Expand Up @@ -4690,7 +4712,7 @@ public function retrieveUserLoginReportByLoginId($applicationId, $loginId, $star
* @param string $loginId The userId id.
* @param array $start The start instant as UTC milliseconds since Epoch.
* @param array $end The end instant as UTC milliseconds since Epoch.
* @param array $loginIdTypes the identity types that FusionAuth will compare the loginId to.
* @param array $loginIdTypes The identity types that FusionAuth will compare the loginId to.
*
* @return ClientResponse The ClientResponse.
* @throws \Exception
Expand Down