Skip to content
Open
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
24 changes: 22 additions & 2 deletions src/FusionAuthClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,33 @@ export class FusionAuthClient {
*
* 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.
* @returns {Promise<ClientResponse<void>>}
*/
checkChangePasswordUsingLoginId(loginId: string): Promise<ClientResponse<void>> {
return this.start<void, Errors>()
.withUri('/api/user/change-password')
.withParameter('username', loginId)
.withParameter('loginId', loginId)
.withMethod("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<String>} loginIdTypes the identity types that FusionAuth will compare the loginId to.
* @returns {Promise<ClientResponse<void>>}
*/
checkChangePasswordUsingLoginIdAndLoginIdTypes(loginId: string, loginIdTypes: Array<String>): Promise<ClientResponse<void>> {
return this.start<void, Errors>()
.withUri('/api/user/change-password')
.withParameter('loginId', loginId)
.withParameter('loginIdTypes', loginIdTypes)
.withMethod("GET")
.go();
}
Expand Down