Skip to content

Commit 80d6930

Browse files
authored
Merge wied03/ENG-2158/change-password (#191)
* add new overload case * fix comment capitalization
1 parent 1aff30a commit 80d6930

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

src/FusionAuthClient.ts

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,33 @@ export class FusionAuthClient {
257257
*
258258
* 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.
259259
*
260-
* @param {string} loginId The loginId of the User that you intend to change the password for.
260+
* @param {string} loginId The loginId (email or username) of the User that you intend to change the password for.
261261
* @returns {Promise<ClientResponse<void>>}
262262
*/
263263
checkChangePasswordUsingLoginId(loginId: string): Promise<ClientResponse<void>> {
264264
return this.start<void, Errors>()
265265
.withUri('/api/user/change-password')
266-
.withParameter('username', loginId)
266+
.withParameter('loginId', loginId)
267+
.withMethod("GET")
268+
.go();
269+
}
270+
271+
/**
272+
* Check to see if the user must obtain a Trust Request Id in order to complete a change password request.
273+
* When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
274+
* your password, you must obtain a Trust Request Id by completing a Two-Factor Step-Up authentication.
275+
*
276+
* 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.
277+
*
278+
* @param {string} loginId The loginId of the User that you intend to change the password for.
279+
* @param {Array<String>} loginIdTypes The identity types that FusionAuth will compare the loginId to.
280+
* @returns {Promise<ClientResponse<void>>}
281+
*/
282+
checkChangePasswordUsingLoginIdAndLoginIdTypes(loginId: string, loginIdTypes: Array<String>): Promise<ClientResponse<void>> {
283+
return this.start<void, Errors>()
284+
.withUri('/api/user/change-password')
285+
.withParameter('loginId', loginId)
286+
.withParameter('loginIdTypes', loginIdTypes)
267287
.withMethod("GET")
268288
.go();
269289
}
@@ -3934,7 +3954,7 @@ export class FusionAuthClient {
39343954
* Retrieves the user for the loginId, using specific loginIdTypes.
39353955
*
39363956
* @param {string} loginId The email or username of the user.
3937-
* @param {Array<String>} loginIdTypes the identity types that FusionAuth will compare the loginId to.
3957+
* @param {Array<String>} loginIdTypes The identity types that FusionAuth will compare the loginId to.
39383958
* @returns {Promise<ClientResponse<UserResponse>>}
39393959
*/
39403960
retrieveUserByLoginIdWithLoginIdTypes(loginId: string, loginIdTypes: Array<String>): Promise<ClientResponse<UserResponse>> {
@@ -4159,7 +4179,7 @@ export class FusionAuthClient {
41594179
* @param {string} loginId The userId id.
41604180
* @param {number} start The start instant as UTC milliseconds since Epoch.
41614181
* @param {number} end The end instant as UTC milliseconds since Epoch.
4162-
* @param {Array<String>} loginIdTypes the identity types that FusionAuth will compare the loginId to.
4182+
* @param {Array<String>} loginIdTypes The identity types that FusionAuth will compare the loginId to.
41634183
* @returns {Promise<ClientResponse<LoginReportResponse>>}
41644184
*/
41654185
retrieveUserLoginReportByLoginIdAndLoginIdTypes(applicationId: UUID, loginId: string, start: number, end: number, loginIdTypes: Array<String>): Promise<ClientResponse<LoginReportResponse>> {

0 commit comments

Comments
 (0)