Skip to content

Commit 317a023

Browse files
committed
squash merge degroff/change-password-lockout
2 parents ccbc819 + b463dc3 commit 317a023

File tree

4 files changed

+34
-16
lines changed

4 files changed

+34
-16
lines changed

build.savant

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* language governing permissions and limitations under the License.
1515
*/
1616

17-
project(group: "io.fusionauth", name: "fusionauth-typescript-client", version: "1.41.3", licenses: ["ApacheV2_0"]) {
17+
project(group: "io.fusionauth", name: "fusionauth-typescript-client", version: "1.42.0", licenses: ["ApacheV2_0"]) {
1818
workflow {
1919
fetch {
2020
cache()

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@fusionauth/typescript-client",
3-
"version": "1.41.3",
3+
"version": "1.42.0",
44
"description": "A typescript implementation of the FusionAuth client.",
55
"main": "build/index.js",
66
"types": "build/index.d.ts",

src/FusionAuthClient.ts

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,11 +1371,11 @@ export class FusionAuthClient {
13711371
}
13721372

13731373
/**
1374-
* Disable Two Factor authentication for a user.
1374+
* Disable two-factor authentication for a user.
13751375
*
1376-
* @param {UUID} userId The Id of the User for which you're disabling Two Factor authentication.
1376+
* @param {UUID} userId The Id of the User for which you're disabling two-factor authentication.
13771377
* @param {string} methodId The two-factor method identifier you wish to disable
1378-
* @param {string} code The Two Factor code used verify the the caller knows the Two Factor secret.
1378+
* @param {string} code The two-factor code used verify the the caller knows the two-factor secret.
13791379
* @returns {Promise<ClientResponse<void>>}
13801380
*/
13811381
disableTwoFactor(userId: UUID, methodId: string, code: string): Promise<ClientResponse<void>> {
@@ -1389,9 +1389,9 @@ export class FusionAuthClient {
13891389
}
13901390

13911391
/**
1392-
* Disable Two Factor authentication for a user using a JSON body rather than URL parameters.
1392+
* Disable two-factor authentication for a user using a JSON body rather than URL parameters.
13931393
*
1394-
* @param {UUID} userId The Id of the User for which you're disabling Two Factor authentication.
1394+
* @param {UUID} userId The Id of the User for which you're disabling two-factor authentication.
13951395
* @param {TwoFactorDisableRequest} request The request information that contains the code and methodId along with any event information.
13961396
* @returns {Promise<ClientResponse<void>>}
13971397
*/
@@ -1405,10 +1405,10 @@ export class FusionAuthClient {
14051405
}
14061406

14071407
/**
1408-
* Enable Two Factor authentication for a user.
1408+
* Enable two-factor authentication for a user.
14091409
*
1410-
* @param {UUID} userId The Id of the user to enable Two Factor authentication.
1411-
* @param {TwoFactorRequest} request The two factor enable request information.
1410+
* @param {UUID} userId The Id of the user to enable two-factor authentication.
1411+
* @param {TwoFactorRequest} request The two-factor enable request information.
14121412
* @returns {Promise<ClientResponse<TwoFactorResponse>>}
14131413
*/
14141414
enableTwoFactor(userId: UUID, request: TwoFactorRequest): Promise<ClientResponse<TwoFactorResponse>> {
@@ -1425,7 +1425,7 @@ export class FusionAuthClient {
14251425
* Makes a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint for an access token.
14261426
*
14271427
* @param {string} code The authorization code returned on the /oauth2/authorize response.
1428-
* @param {string} client_id The unique client identifier. The client Id is the Id of the FusionAuth Application in which you you are attempting to authenticate.
1428+
* @param {string} client_id The unique client identifier. The client Id is the Id of the FusionAuth Application in which you are attempting to authenticate.
14291429
* @param {string} client_secret (Optional) The client secret. This value will be required if client authentication is enabled.
14301430
* @param {string} redirect_uri The URI to redirect to upon a successful request.
14311431
* @returns {Promise<ClientResponse<AccessToken>>}
@@ -1450,7 +1450,7 @@ export class FusionAuthClient {
14501450
* Makes a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint and a code_verifier for an access token.
14511451
*
14521452
* @param {string} code The authorization code returned on the /oauth2/authorize response.
1453-
* @param {string} client_id (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you you are attempting to authenticate. This parameter is optional when the Authorization header is provided.
1453+
* @param {string} client_id (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you are attempting to authenticate. This parameter is optional when the Authorization header is provided.
14541454
* @param {string} client_secret (Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header.
14551455
* @param {string} redirect_uri The URI to redirect to upon a successful request.
14561456
* @param {string} code_verifier The random string generated previously. Will be compared with the code_challenge sent previously, which allows the OAuth provider to authenticate your app.
@@ -1477,7 +1477,7 @@ export class FusionAuthClient {
14771477
* If you will be using the Refresh Token Grant, you will make a request to the Token endpoint to exchange the user’s refresh token for an access token.
14781478
*
14791479
* @param {string} refresh_token The refresh token that you would like to use to exchange for an access token.
1480-
* @param {string} client_id (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you you are attempting to authenticate. This parameter is optional when the Authorization header is provided.
1480+
* @param {string} client_id (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you are attempting to authenticate. This parameter is optional when the Authorization header is provided.
14811481
* @param {string} client_secret (Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header.
14821482
* @param {string} scope (Optional) This parameter is optional and if omitted, the same scope requested during the authorization request will be used. If provided the scopes must match those requested during the initial authorization request.
14831483
* @param {string} user_code (Optional) The end-user verification code. This code is required if using this endpoint to approve the Device Authorization.
@@ -1519,7 +1519,7 @@ export class FusionAuthClient {
15191519
*
15201520
* @param {string} username The login identifier of the user. The login identifier can be either the email or the username.
15211521
* @param {string} password The user’s password.
1522-
* @param {string} client_id (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you you are attempting to authenticate. This parameter is optional when the Authorization header is provided.
1522+
* @param {string} client_id (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you are attempting to authenticate. This parameter is optional when the Authorization header is provided.
15231523
* @param {string} client_secret (Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header.
15241524
* @param {string} scope (Optional) This parameter is optional and if omitted, the same scope requested during the authorization request will be used. If provided the scopes must match those requested during the initial authorization request.
15251525
* @param {string} user_code (Optional) The end-user verification code. This code is required if using this endpoint to approve the Device Authorization.
@@ -6692,14 +6692,25 @@ export interface FacebookIdentityProvider extends BaseIdentityProvider<FacebookA
66926692
permissions?: string;
66936693
}
66946694

6695+
/**
6696+
* A policy to configure if and when the user-action is canceled prior to the expiration of the action.
6697+
*
6698+
* @author Daniel DeGroff
6699+
*/
6700+
export interface FailedAuthenticationActionCancelPolicy {
6701+
onPasswordReset?: boolean;
6702+
}
6703+
66956704
/**
66966705
* Configuration for the behavior of failed login attempts. This helps us protect against brute force password attacks.
66976706
*
66986707
* @author Daniel DeGroff
66996708
*/
67006709
export interface FailedAuthenticationConfiguration {
6710+
actionCancelPolicy?: FailedAuthenticationActionCancelPolicy;
67016711
actionDuration?: number;
67026712
actionDurationUnit?: ExpiryUnit;
6713+
emailUser?: boolean;
67036714
resetCountInSeconds?: number;
67046715
tooManyAttempts?: number;
67056716
userActionId?: UUID;
@@ -8094,6 +8105,7 @@ export interface LoginResponse {
80948105
actions?: Array<LoginPreventedResponse>;
80958106
changePasswordId?: string;
80968107
changePasswordReason?: ChangePasswordReason;
8108+
configurableMethods?: Array<string>;
80978109
emailVerificationId?: string;
80988110
methods?: Array<TwoFactorMethod>;
80998111
pendingIdPLinkId?: string;
@@ -8297,7 +8309,8 @@ export interface MultiFactorEmailTemplate {
82978309
*/
82988310
export enum MultiFactorLoginPolicy {
82998311
Disabled = "Disabled",
8300-
Enabled = "Enabled"
8312+
Enabled = "Enabled",
8313+
Required = "Required"
83018314
}
83028315

83038316
export interface MultiFactorSMSMethod extends Enableable {
@@ -8938,6 +8951,7 @@ export interface RefreshTokenResponse {
89388951
*/
89398952
export interface RefreshTokenRevocationPolicy {
89408953
onLoginPrevented?: boolean;
8954+
onMultiFactorEnable?: boolean;
89418955
onPasswordChanged?: boolean;
89428956
}
89438957

@@ -9434,6 +9448,8 @@ export interface Templates {
94349448
oauth2Register?: string;
94359449
oauth2StartIdPLink?: string;
94369450
oauth2TwoFactor?: string;
9451+
oauth2TwoFactorEnable?: string;
9452+
oauth2TwoFactorEnableComplete?: string;
94379453
oauth2TwoFactorMethods?: string;
94389454
oauth2Wait?: string;
94399455
oauth2WebAuthn?: string;
@@ -9880,12 +9896,14 @@ export interface TwoFactorRequest extends BaseEventRequest {
98809896
mobilePhone?: string;
98819897
secret?: string;
98829898
secretBase32Encoded?: string;
9899+
twoFactorId?: string;
98839900
}
98849901

98859902
/**
98869903
* @author Daniel DeGroff
98879904
*/
98889905
export interface TwoFactorResponse {
9906+
code?: string;
98899907
recoveryCodes?: Array<string>;
98909908
}
98919909

0 commit comments

Comments
 (0)