@fusionauth/typescript-client 1.36.0 → 1.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/FusionAuthClient.d.ts +99 -18
- package/build/src/FusionAuthClient.js +83 -11
- package/build/src/FusionAuthClient.js.map +1 -1
- package/dist/fusionauth-typescript-client.js +84 -12
- package/dist/fusionauth-typescript-client.min.js +1 -1
- package/dist/fusionauth-typescript-client.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -78,9 +78,9 @@ export declare class FusionAuthClient {
|
|
|
78
78
|
/**
|
|
79
79
|
* Check to see if the user must obtain a Trust Token Id in order to complete a change password request.
|
|
80
80
|
* When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
|
|
81
|
-
* your password, you must obtain a
|
|
81
|
+
* your password, you must obtain a Trust Token by completing a Two-Factor Step-Up authentication.
|
|
82
82
|
*
|
|
83
|
-
* An HTTP status code of
|
|
83
|
+
* 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.
|
|
84
84
|
*
|
|
85
85
|
* @param {string} changePasswordId The change password Id used to find the user. This value is generated by FusionAuth once the change password workflow has been initiated.
|
|
86
86
|
* @returns {Promise<ClientResponse<void>>}
|
|
@@ -89,9 +89,9 @@ export declare class FusionAuthClient {
|
|
|
89
89
|
/**
|
|
90
90
|
* Check to see if the user must obtain a Trust Token Id in order to complete a change password request.
|
|
91
91
|
* When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
|
|
92
|
-
* your password, you must obtain a
|
|
92
|
+
* your password, you must obtain a Trust Token by completing a Two-Factor Step-Up authentication.
|
|
93
93
|
*
|
|
94
|
-
* An HTTP status code of
|
|
94
|
+
* 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.
|
|
95
95
|
*
|
|
96
96
|
* @param {string} encodedJWT The encoded JWT (access token).
|
|
97
97
|
* @returns {Promise<ClientResponse<void>>}
|
|
@@ -100,9 +100,9 @@ export declare class FusionAuthClient {
|
|
|
100
100
|
/**
|
|
101
101
|
* Check to see if the user must obtain a Trust Request Id in order to complete a change password request.
|
|
102
102
|
* When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
|
|
103
|
-
* your password, you must obtain a
|
|
103
|
+
* your password, you must obtain a Trust Request Id by completing a Two-Factor Step-Up authentication.
|
|
104
104
|
*
|
|
105
|
-
* An HTTP status code of
|
|
105
|
+
* 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.
|
|
106
106
|
*
|
|
107
107
|
* @param {string} loginId The loginId of the User that you intend to change the password for.
|
|
108
108
|
* @returns {Promise<ClientResponse<void>>}
|
|
@@ -888,6 +888,16 @@ export declare class FusionAuthClient {
|
|
|
888
888
|
* @returns {Promise<ClientResponse<LoginResponse>>}
|
|
889
889
|
*/
|
|
890
890
|
loginPing(userId: UUID, applicationId: UUID, callerIPAddress: string): Promise<ClientResponse<LoginResponse>>;
|
|
891
|
+
/**
|
|
892
|
+
* Sends a ping to FusionAuth indicating that the user was automatically logged into an application. When using
|
|
893
|
+
* FusionAuth's SSO or your own, you should call this if the user is already logged in centrally, but accesses an
|
|
894
|
+
* application where they no longer have a session. This helps correctly track login counts, times and helps with
|
|
895
|
+
* reporting.
|
|
896
|
+
*
|
|
897
|
+
* @param {LoginPingRequest} request The login request that contains the user credentials used to log them in.
|
|
898
|
+
* @returns {Promise<ClientResponse<LoginResponse>>}
|
|
899
|
+
*/
|
|
900
|
+
loginPingWithRequest(request: LoginPingRequest): Promise<ClientResponse<LoginResponse>>;
|
|
891
901
|
/**
|
|
892
902
|
* The Logout API is intended to be used to remove the refresh token and access token cookies if they exist on the
|
|
893
903
|
* client and revoke the refresh token stored. This API does nothing if the request does not contain an access
|
|
@@ -1636,12 +1646,12 @@ export declare class FusionAuthClient {
|
|
|
1636
1646
|
*/
|
|
1637
1647
|
retrieveRecentLogins(offset: number, limit: number): Promise<ClientResponse<RecentLoginResponse>>;
|
|
1638
1648
|
/**
|
|
1639
|
-
* Retrieves a single refresh token by unique Id. This is not the same thing as the string value of the refresh token
|
|
1649
|
+
* Retrieves a single refresh token by unique Id. This is not the same thing as the string value of the refresh token. If you have that, you already have what you need.
|
|
1640
1650
|
*
|
|
1641
|
-
* @param {UUID}
|
|
1651
|
+
* @param {UUID} tokenId The Id of the token.
|
|
1642
1652
|
* @returns {Promise<ClientResponse<RefreshTokenResponse>>}
|
|
1643
1653
|
*/
|
|
1644
|
-
retrieveRefreshTokenById(
|
|
1654
|
+
retrieveRefreshTokenById(tokenId: UUID): Promise<ClientResponse<RefreshTokenResponse>>;
|
|
1645
1655
|
/**
|
|
1646
1656
|
* Retrieves the refresh tokens that belong to the user with the given Id.
|
|
1647
1657
|
*
|
|
@@ -1720,6 +1730,18 @@ export declare class FusionAuthClient {
|
|
|
1720
1730
|
* @returns {Promise<ClientResponse<TwoFactorRecoveryCodeResponse>>}
|
|
1721
1731
|
*/
|
|
1722
1732
|
retrieveTwoFactorRecoveryCodes(userId: UUID): Promise<ClientResponse<TwoFactorRecoveryCodeResponse>>;
|
|
1733
|
+
/**
|
|
1734
|
+
* Retrieve a user's two-factor status.
|
|
1735
|
+
*
|
|
1736
|
+
* This can be used to see if a user will need to complete a two-factor challenge to complete a login,
|
|
1737
|
+
* and optionally identify the state of the two-factor trust across various applications.
|
|
1738
|
+
*
|
|
1739
|
+
* @param {UUID} userId The user Id to retrieve the Two-Factor status.
|
|
1740
|
+
* @param {UUID} applicationId The optional applicationId to verify.
|
|
1741
|
+
* @param {string} twoFactorTrustId The optional two-factor trust Id to verify.
|
|
1742
|
+
* @returns {Promise<ClientResponse<TwoFactorStatusResponse>>}
|
|
1743
|
+
*/
|
|
1744
|
+
retrieveTwoFactorStatus(userId: UUID, applicationId: UUID, twoFactorTrustId: string): Promise<ClientResponse<TwoFactorStatusResponse>>;
|
|
1723
1745
|
/**
|
|
1724
1746
|
* Retrieves the user for the given Id.
|
|
1725
1747
|
*
|
|
@@ -2459,6 +2481,15 @@ export declare class FusionAuthClient {
|
|
|
2459
2481
|
* @returns {Promise<ClientResponse<void>>}
|
|
2460
2482
|
*/
|
|
2461
2483
|
verifyEmailAddress(request: VerifyEmailRequest): Promise<ClientResponse<void>>;
|
|
2484
|
+
/**
|
|
2485
|
+
* Administratively verify a user's email address. Use this method to bypass email verification for the user.
|
|
2486
|
+
*
|
|
2487
|
+
* The request body will contain the userId to be verified. An API key is required when sending the userId in the request body.
|
|
2488
|
+
*
|
|
2489
|
+
* @param {VerifyEmailRequest} request The request that contains the userId to verify.
|
|
2490
|
+
* @returns {Promise<ClientResponse<void>>}
|
|
2491
|
+
*/
|
|
2492
|
+
verifyEmailAddressByUserId(request: VerifyEmailRequest): Promise<ClientResponse<void>>;
|
|
2462
2493
|
/**
|
|
2463
2494
|
* Confirms an application registration. The Id given is usually from an email sent to the user.
|
|
2464
2495
|
*
|
|
@@ -2502,6 +2533,7 @@ export interface AccessToken {
|
|
|
2502
2533
|
expires_in?: number;
|
|
2503
2534
|
id_token?: string;
|
|
2504
2535
|
refresh_token?: string;
|
|
2536
|
+
refresh_token_id?: UUID;
|
|
2505
2537
|
scope?: string;
|
|
2506
2538
|
token_type?: TokenType;
|
|
2507
2539
|
userId?: UUID;
|
|
@@ -2548,6 +2580,9 @@ export declare enum Algorithm {
|
|
|
2548
2580
|
HS256 = "HS256",
|
|
2549
2581
|
HS384 = "HS384",
|
|
2550
2582
|
HS512 = "HS512",
|
|
2583
|
+
PS256 = "PS256",
|
|
2584
|
+
PS384 = "PS384",
|
|
2585
|
+
PS512 = "PS512",
|
|
2551
2586
|
RS256 = "RS256",
|
|
2552
2587
|
RS384 = "RS384",
|
|
2553
2588
|
RS512 = "RS512",
|
|
@@ -2622,6 +2657,7 @@ export interface Application {
|
|
|
2622
2657
|
cleanSpeakConfiguration?: CleanSpeakConfiguration;
|
|
2623
2658
|
data?: Record<string, any>;
|
|
2624
2659
|
emailConfiguration?: ApplicationEmailConfiguration;
|
|
2660
|
+
externalIdentifierConfiguration?: ApplicationExternalIdentifierConfiguration;
|
|
2625
2661
|
formConfiguration?: ApplicationFormConfiguration;
|
|
2626
2662
|
id?: UUID;
|
|
2627
2663
|
insertInstant?: number;
|
|
@@ -2668,11 +2704,10 @@ export interface ApplicationEmailConfiguration {
|
|
|
2668
2704
|
twoFactorMethodRemoveEmailTemplateId?: UUID;
|
|
2669
2705
|
}
|
|
2670
2706
|
/**
|
|
2671
|
-
*
|
|
2672
|
-
*
|
|
2673
|
-
* @author Brian Pontarelli
|
|
2707
|
+
* @author Daniel DeGroff
|
|
2674
2708
|
*/
|
|
2675
|
-
export interface
|
|
2709
|
+
export interface ApplicationExternalIdentifierConfiguration {
|
|
2710
|
+
twoFactorTrustIdTimeToLiveInSeconds?: number;
|
|
2676
2711
|
}
|
|
2677
2712
|
/**
|
|
2678
2713
|
* @author Daniel DeGroff
|
|
@@ -2686,7 +2721,17 @@ export interface ApplicationFormConfiguration {
|
|
|
2686
2721
|
*/
|
|
2687
2722
|
export interface ApplicationMultiFactorConfiguration {
|
|
2688
2723
|
email?: MultiFactorEmailTemplate;
|
|
2724
|
+
loginPolicy?: MultiFactorLoginPolicy;
|
|
2689
2725
|
sms?: MultiFactorSMSTemplate;
|
|
2726
|
+
trustPolicy?: ApplicationMultiFactorTrustPolicy;
|
|
2727
|
+
}
|
|
2728
|
+
/**
|
|
2729
|
+
* @author Daniel DeGroff
|
|
2730
|
+
*/
|
|
2731
|
+
export declare enum ApplicationMultiFactorTrustPolicy {
|
|
2732
|
+
Any = "Any",
|
|
2733
|
+
This = "This",
|
|
2734
|
+
None = "None"
|
|
2690
2735
|
}
|
|
2691
2736
|
/**
|
|
2692
2737
|
* A Application-level policy for deleting Users.
|
|
@@ -2704,7 +2749,6 @@ export interface ApplicationRegistrationDeletePolicy {
|
|
|
2704
2749
|
export interface ApplicationRequest extends BaseEventRequest {
|
|
2705
2750
|
application?: Application;
|
|
2706
2751
|
role?: ApplicationRole;
|
|
2707
|
-
webhookIds?: Array<UUID>;
|
|
2708
2752
|
}
|
|
2709
2753
|
/**
|
|
2710
2754
|
* The Application API response.
|
|
@@ -2862,6 +2906,7 @@ export interface BaseElasticSearchCriteria extends BaseSearchCriteria {
|
|
|
2862
2906
|
* @author Brian Pontarelli
|
|
2863
2907
|
*/
|
|
2864
2908
|
export interface BaseEvent {
|
|
2909
|
+
applicationIds?: Array<UUID>;
|
|
2865
2910
|
createInstant?: number;
|
|
2866
2911
|
id?: UUID;
|
|
2867
2912
|
info?: EventInfo;
|
|
@@ -3247,6 +3292,7 @@ export interface EmailAddress {
|
|
|
3247
3292
|
*/
|
|
3248
3293
|
export interface EmailConfiguration {
|
|
3249
3294
|
additionalHeaders?: Array<EmailHeader>;
|
|
3295
|
+
debug?: boolean;
|
|
3250
3296
|
defaultFromEmail?: string;
|
|
3251
3297
|
defaultFromName?: string;
|
|
3252
3298
|
emailUpdateEmailTemplateId?: UUID;
|
|
@@ -4245,6 +4291,7 @@ export interface IdentityProviderLink {
|
|
|
4245
4291
|
*/
|
|
4246
4292
|
export declare enum IdentityProviderLinkingStrategy {
|
|
4247
4293
|
CreatePendingLink = "CreatePendingLink",
|
|
4294
|
+
Disabled = "Disabled",
|
|
4248
4295
|
LinkAnonymously = "LinkAnonymously",
|
|
4249
4296
|
LinkByEmail = "LinkByEmail",
|
|
4250
4297
|
LinkByEmailForExistingUser = "LinkByEmailForExistingUser",
|
|
@@ -4554,7 +4601,6 @@ export interface JWTConfiguration extends Enableable {
|
|
|
4554
4601
|
* @author Brian Pontarelli
|
|
4555
4602
|
*/
|
|
4556
4603
|
export interface JWTPublicKeyUpdateEvent extends BaseEvent {
|
|
4557
|
-
applicationIds?: Array<UUID>;
|
|
4558
4604
|
}
|
|
4559
4605
|
/**
|
|
4560
4606
|
* Models the JWT Refresh Event. This event will be fired when a JWT is "refreshed" (generated) using a Refresh Token.
|
|
@@ -4571,12 +4617,14 @@ export interface JWTRefreshEvent extends BaseEvent {
|
|
|
4571
4617
|
/**
|
|
4572
4618
|
* API response for refreshing a JWT with a Refresh Token.
|
|
4573
4619
|
* <p>
|
|
4574
|
-
* Using a different response object from RefreshTokenResponse because the retrieve response will return an object for refreshToken, and this is a
|
|
4620
|
+
* Using a different response object from RefreshTokenResponse because the retrieve response will return an object for refreshToken, and this is a
|
|
4621
|
+
* string.
|
|
4575
4622
|
*
|
|
4576
4623
|
* @author Daniel DeGroff
|
|
4577
4624
|
*/
|
|
4578
4625
|
export interface JWTRefreshResponse {
|
|
4579
4626
|
refreshToken?: string;
|
|
4627
|
+
refreshTokenId?: UUID;
|
|
4580
4628
|
token?: string;
|
|
4581
4629
|
}
|
|
4582
4630
|
/**
|
|
@@ -4588,6 +4636,7 @@ export interface JWTRefreshResponse {
|
|
|
4588
4636
|
export interface JWTRefreshTokenRevokeEvent extends BaseEvent {
|
|
4589
4637
|
applicationId?: UUID;
|
|
4590
4638
|
applicationTimeToLiveInSeconds?: Record<UUID, number>;
|
|
4639
|
+
refreshToken?: RefreshToken;
|
|
4591
4640
|
user?: User;
|
|
4592
4641
|
userId?: UUID;
|
|
4593
4642
|
}
|
|
@@ -4859,6 +4908,14 @@ export declare enum LoginIdType {
|
|
|
4859
4908
|
email = "email",
|
|
4860
4909
|
username = "username"
|
|
4861
4910
|
}
|
|
4911
|
+
/**
|
|
4912
|
+
* Login Ping API request object.
|
|
4913
|
+
*
|
|
4914
|
+
* @author Daniel DeGroff
|
|
4915
|
+
*/
|
|
4916
|
+
export interface LoginPingRequest extends BaseLoginRequest {
|
|
4917
|
+
userId?: UUID;
|
|
4918
|
+
}
|
|
4862
4919
|
/**
|
|
4863
4920
|
* The summary of the action that is preventing login to be returned on the login response.
|
|
4864
4921
|
*
|
|
@@ -4941,6 +4998,7 @@ export interface LoginResponse {
|
|
|
4941
4998
|
methods?: Array<TwoFactorMethod>;
|
|
4942
4999
|
pendingIdPLinkId?: string;
|
|
4943
5000
|
refreshToken?: string;
|
|
5001
|
+
refreshTokenId?: UUID;
|
|
4944
5002
|
registrationVerificationId?: string;
|
|
4945
5003
|
state?: Record<string, any>;
|
|
4946
5004
|
threatsDetected?: Array<AuthenticationThreats>;
|
|
@@ -5109,6 +5167,13 @@ export interface MultiFactorEmailMethod extends Enableable {
|
|
|
5109
5167
|
export interface MultiFactorEmailTemplate {
|
|
5110
5168
|
templateId?: UUID;
|
|
5111
5169
|
}
|
|
5170
|
+
/**
|
|
5171
|
+
* @author Daniel DeGroff
|
|
5172
|
+
*/
|
|
5173
|
+
export declare enum MultiFactorLoginPolicy {
|
|
5174
|
+
Disabled = "Disabled",
|
|
5175
|
+
Enabled = "Enabled"
|
|
5176
|
+
}
|
|
5112
5177
|
export interface MultiFactorSMSMethod extends Enableable {
|
|
5113
5178
|
messengerId?: UUID;
|
|
5114
5179
|
templateId?: UUID;
|
|
@@ -5532,11 +5597,13 @@ export interface ReactorStatus {
|
|
|
5532
5597
|
advancedLambdas?: ReactorFeatureStatus;
|
|
5533
5598
|
advancedMultiFactorAuthentication?: ReactorFeatureStatus;
|
|
5534
5599
|
advancedRegistration?: ReactorFeatureStatus;
|
|
5600
|
+
applicationMultiFactorAuthentication?: ReactorFeatureStatus;
|
|
5535
5601
|
applicationThemes?: ReactorFeatureStatus;
|
|
5536
5602
|
breachedPasswordDetection?: ReactorFeatureStatus;
|
|
5537
5603
|
connectors?: ReactorFeatureStatus;
|
|
5538
5604
|
entityManagement?: ReactorFeatureStatus;
|
|
5539
5605
|
expiration?: string;
|
|
5606
|
+
licenseAttributes?: Record<string, string>;
|
|
5540
5607
|
licensed?: boolean;
|
|
5541
5608
|
scimServer?: ReactorFeatureStatus;
|
|
5542
5609
|
threatDetection?: ReactorFeatureStatus;
|
|
@@ -6144,6 +6211,7 @@ export interface TenantLoginConfiguration {
|
|
|
6144
6211
|
export interface TenantMultiFactorConfiguration {
|
|
6145
6212
|
authenticator?: MultiFactorAuthenticatorMethod;
|
|
6146
6213
|
email?: MultiFactorEmailMethod;
|
|
6214
|
+
loginPolicy?: MultiFactorLoginPolicy;
|
|
6147
6215
|
sms?: MultiFactorSMSMethod;
|
|
6148
6216
|
}
|
|
6149
6217
|
export interface TenantOAuth2Configuration {
|
|
@@ -6172,6 +6240,7 @@ export interface TenantRegistrationConfiguration {
|
|
|
6172
6240
|
export interface TenantRequest extends BaseEventRequest {
|
|
6173
6241
|
sourceTenantId?: UUID;
|
|
6174
6242
|
tenant?: Tenant;
|
|
6243
|
+
webhookIds?: Array<UUID>;
|
|
6175
6244
|
}
|
|
6176
6245
|
/**
|
|
6177
6246
|
* @author Daniel DeGroff
|
|
@@ -6448,6 +6517,18 @@ export interface TwoFactorStartResponse {
|
|
|
6448
6517
|
methods?: Array<TwoFactorMethod>;
|
|
6449
6518
|
twoFactorId?: string;
|
|
6450
6519
|
}
|
|
6520
|
+
/**
|
|
6521
|
+
* @author Daniel DeGroff
|
|
6522
|
+
*/
|
|
6523
|
+
export interface TwoFactorStatusResponse {
|
|
6524
|
+
trusts?: Array<TwoFactorTrust>;
|
|
6525
|
+
twoFactorTrustId?: string;
|
|
6526
|
+
}
|
|
6527
|
+
export interface TwoFactorTrust {
|
|
6528
|
+
applicationId?: UUID;
|
|
6529
|
+
expiration?: number;
|
|
6530
|
+
startInstant?: number;
|
|
6531
|
+
}
|
|
6451
6532
|
export interface UIConfiguration {
|
|
6452
6533
|
headerColor?: string;
|
|
6453
6534
|
logoURL?: string;
|
|
@@ -6533,7 +6614,6 @@ export interface UserActionEvent extends BaseEvent {
|
|
|
6533
6614
|
actioneeUserId?: UUID;
|
|
6534
6615
|
actionerUserId?: UUID;
|
|
6535
6616
|
actionId?: UUID;
|
|
6536
|
-
applicationIds?: Array<UUID>;
|
|
6537
6617
|
comment?: string;
|
|
6538
6618
|
email?: Email;
|
|
6539
6619
|
emailedUser?: boolean;
|
|
@@ -7137,6 +7217,7 @@ export declare enum VerificationStrategy {
|
|
|
7137
7217
|
*/
|
|
7138
7218
|
export interface VerifyEmailRequest extends BaseEventRequest {
|
|
7139
7219
|
oneTimeCode?: string;
|
|
7220
|
+
userId?: UUID;
|
|
7140
7221
|
verificationId?: string;
|
|
7141
7222
|
}
|
|
7142
7223
|
/**
|
|
@@ -7172,7 +7253,6 @@ export interface VersionResponse {
|
|
|
7172
7253
|
* @author Brian Pontarelli
|
|
7173
7254
|
*/
|
|
7174
7255
|
export interface Webhook {
|
|
7175
|
-
applicationIds?: Array<UUID>;
|
|
7176
7256
|
connectTimeout?: number;
|
|
7177
7257
|
data?: Record<string, any>;
|
|
7178
7258
|
description?: string;
|
|
@@ -7186,6 +7266,7 @@ export interface Webhook {
|
|
|
7186
7266
|
lastUpdateInstant?: number;
|
|
7187
7267
|
readTimeout?: number;
|
|
7188
7268
|
sslCertificate?: string;
|
|
7269
|
+
tenantIds?: Array<UUID>;
|
|
7189
7270
|
url?: string;
|
|
7190
7271
|
}
|
|
7191
7272
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright (c) 2019, FusionAuth, All Rights Reserved
|
|
3
|
+
* Copyright (c) 2019-2022, FusionAuth, All Rights Reserved
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -139,9 +139,9 @@ class FusionAuthClient {
|
|
|
139
139
|
/**
|
|
140
140
|
* Check to see if the user must obtain a Trust Token Id in order to complete a change password request.
|
|
141
141
|
* When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
|
|
142
|
-
* your password, you must obtain a
|
|
142
|
+
* your password, you must obtain a Trust Token by completing a Two-Factor Step-Up authentication.
|
|
143
143
|
*
|
|
144
|
-
* An HTTP status code of
|
|
144
|
+
* 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.
|
|
145
145
|
*
|
|
146
146
|
* @param {string} changePasswordId The change password Id used to find the user. This value is generated by FusionAuth once the change password workflow has been initiated.
|
|
147
147
|
* @returns {Promise<ClientResponse<void>>}
|
|
@@ -156,9 +156,9 @@ class FusionAuthClient {
|
|
|
156
156
|
/**
|
|
157
157
|
* Check to see if the user must obtain a Trust Token Id in order to complete a change password request.
|
|
158
158
|
* When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
|
|
159
|
-
* your password, you must obtain a
|
|
159
|
+
* your password, you must obtain a Trust Token by completing a Two-Factor Step-Up authentication.
|
|
160
160
|
*
|
|
161
|
-
* An HTTP status code of
|
|
161
|
+
* 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.
|
|
162
162
|
*
|
|
163
163
|
* @param {string} encodedJWT The encoded JWT (access token).
|
|
164
164
|
* @returns {Promise<ClientResponse<void>>}
|
|
@@ -173,9 +173,9 @@ class FusionAuthClient {
|
|
|
173
173
|
/**
|
|
174
174
|
* Check to see if the user must obtain a Trust Request Id in order to complete a change password request.
|
|
175
175
|
* When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
|
|
176
|
-
* your password, you must obtain a
|
|
176
|
+
* your password, you must obtain a Trust Request Id by completing a Two-Factor Step-Up authentication.
|
|
177
177
|
*
|
|
178
|
-
* An HTTP status code of
|
|
178
|
+
* 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.
|
|
179
179
|
*
|
|
180
180
|
* @param {string} loginId The loginId of the User that you intend to change the password for.
|
|
181
181
|
* @returns {Promise<ClientResponse<void>>}
|
|
@@ -1613,6 +1613,22 @@ class FusionAuthClient {
|
|
|
1613
1613
|
.withMethod("PUT")
|
|
1614
1614
|
.go();
|
|
1615
1615
|
}
|
|
1616
|
+
/**
|
|
1617
|
+
* Sends a ping to FusionAuth indicating that the user was automatically logged into an application. When using
|
|
1618
|
+
* FusionAuth's SSO or your own, you should call this if the user is already logged in centrally, but accesses an
|
|
1619
|
+
* application where they no longer have a session. This helps correctly track login counts, times and helps with
|
|
1620
|
+
* reporting.
|
|
1621
|
+
*
|
|
1622
|
+
* @param {LoginPingRequest} request The login request that contains the user credentials used to log them in.
|
|
1623
|
+
* @returns {Promise<ClientResponse<LoginResponse>>}
|
|
1624
|
+
*/
|
|
1625
|
+
loginPingWithRequest(request) {
|
|
1626
|
+
return this.start()
|
|
1627
|
+
.withUri('/api/login')
|
|
1628
|
+
.withJSONBody(request)
|
|
1629
|
+
.withMethod("PUT")
|
|
1630
|
+
.go();
|
|
1631
|
+
}
|
|
1616
1632
|
/**
|
|
1617
1633
|
* The Logout API is intended to be used to remove the refresh token and access token cookies if they exist on the
|
|
1618
1634
|
* client and revoke the refresh token stored. This API does nothing if the request does not contain an access
|
|
@@ -2983,15 +2999,15 @@ class FusionAuthClient {
|
|
|
2983
2999
|
.go();
|
|
2984
3000
|
}
|
|
2985
3001
|
/**
|
|
2986
|
-
* Retrieves a single refresh token by unique Id. This is not the same thing as the string value of the refresh token
|
|
3002
|
+
* Retrieves a single refresh token by unique Id. This is not the same thing as the string value of the refresh token. If you have that, you already have what you need.
|
|
2987
3003
|
*
|
|
2988
|
-
* @param {UUID}
|
|
3004
|
+
* @param {UUID} tokenId The Id of the token.
|
|
2989
3005
|
* @returns {Promise<ClientResponse<RefreshTokenResponse>>}
|
|
2990
3006
|
*/
|
|
2991
|
-
retrieveRefreshTokenById(
|
|
3007
|
+
retrieveRefreshTokenById(tokenId) {
|
|
2992
3008
|
return this.start()
|
|
2993
3009
|
.withUri('/api/jwt/refresh')
|
|
2994
|
-
.withUriSegment(
|
|
3010
|
+
.withUriSegment(tokenId)
|
|
2995
3011
|
.withMethod("GET")
|
|
2996
3012
|
.go();
|
|
2997
3013
|
}
|
|
@@ -3137,6 +3153,26 @@ class FusionAuthClient {
|
|
|
3137
3153
|
.withMethod("GET")
|
|
3138
3154
|
.go();
|
|
3139
3155
|
}
|
|
3156
|
+
/**
|
|
3157
|
+
* Retrieve a user's two-factor status.
|
|
3158
|
+
*
|
|
3159
|
+
* This can be used to see if a user will need to complete a two-factor challenge to complete a login,
|
|
3160
|
+
* and optionally identify the state of the two-factor trust across various applications.
|
|
3161
|
+
*
|
|
3162
|
+
* @param {UUID} userId The user Id to retrieve the Two-Factor status.
|
|
3163
|
+
* @param {UUID} applicationId The optional applicationId to verify.
|
|
3164
|
+
* @param {string} twoFactorTrustId The optional two-factor trust Id to verify.
|
|
3165
|
+
* @returns {Promise<ClientResponse<TwoFactorStatusResponse>>}
|
|
3166
|
+
*/
|
|
3167
|
+
retrieveTwoFactorStatus(userId, applicationId, twoFactorTrustId) {
|
|
3168
|
+
return this.start()
|
|
3169
|
+
.withUri('/api/two-factor/status')
|
|
3170
|
+
.withParameter('userId', userId)
|
|
3171
|
+
.withParameter('applicationId', applicationId)
|
|
3172
|
+
.withUriSegment(twoFactorTrustId)
|
|
3173
|
+
.withMethod("GET")
|
|
3174
|
+
.go();
|
|
3175
|
+
}
|
|
3140
3176
|
/**
|
|
3141
3177
|
* Retrieves the user for the given Id.
|
|
3142
3178
|
*
|
|
@@ -4463,6 +4499,21 @@ class FusionAuthClient {
|
|
|
4463
4499
|
.withMethod("POST")
|
|
4464
4500
|
.go();
|
|
4465
4501
|
}
|
|
4502
|
+
/**
|
|
4503
|
+
* Administratively verify a user's email address. Use this method to bypass email verification for the user.
|
|
4504
|
+
*
|
|
4505
|
+
* The request body will contain the userId to be verified. An API key is required when sending the userId in the request body.
|
|
4506
|
+
*
|
|
4507
|
+
* @param {VerifyEmailRequest} request The request that contains the userId to verify.
|
|
4508
|
+
* @returns {Promise<ClientResponse<void>>}
|
|
4509
|
+
*/
|
|
4510
|
+
verifyEmailAddressByUserId(request) {
|
|
4511
|
+
return this.start()
|
|
4512
|
+
.withUri('/api/user/verify-email')
|
|
4513
|
+
.withJSONBody(request)
|
|
4514
|
+
.withMethod("POST")
|
|
4515
|
+
.go();
|
|
4516
|
+
}
|
|
4466
4517
|
/**
|
|
4467
4518
|
* Confirms an application registration. The Id given is usually from an email sent to the user.
|
|
4468
4519
|
*
|
|
@@ -4536,11 +4587,23 @@ var Algorithm;
|
|
|
4536
4587
|
Algorithm["HS256"] = "HS256";
|
|
4537
4588
|
Algorithm["HS384"] = "HS384";
|
|
4538
4589
|
Algorithm["HS512"] = "HS512";
|
|
4590
|
+
Algorithm["PS256"] = "PS256";
|
|
4591
|
+
Algorithm["PS384"] = "PS384";
|
|
4592
|
+
Algorithm["PS512"] = "PS512";
|
|
4539
4593
|
Algorithm["RS256"] = "RS256";
|
|
4540
4594
|
Algorithm["RS384"] = "RS384";
|
|
4541
4595
|
Algorithm["RS512"] = "RS512";
|
|
4542
4596
|
Algorithm["none"] = "none";
|
|
4543
4597
|
})(Algorithm = exports.Algorithm || (exports.Algorithm = {}));
|
|
4598
|
+
/**
|
|
4599
|
+
* @author Daniel DeGroff
|
|
4600
|
+
*/
|
|
4601
|
+
var ApplicationMultiFactorTrustPolicy;
|
|
4602
|
+
(function (ApplicationMultiFactorTrustPolicy) {
|
|
4603
|
+
ApplicationMultiFactorTrustPolicy["Any"] = "Any";
|
|
4604
|
+
ApplicationMultiFactorTrustPolicy["This"] = "This";
|
|
4605
|
+
ApplicationMultiFactorTrustPolicy["None"] = "None";
|
|
4606
|
+
})(ApplicationMultiFactorTrustPolicy = exports.ApplicationMultiFactorTrustPolicy || (exports.ApplicationMultiFactorTrustPolicy = {}));
|
|
4544
4607
|
/**
|
|
4545
4608
|
* @author Brett Pontarelli
|
|
4546
4609
|
*/
|
|
@@ -4830,6 +4893,7 @@ var HTTPMethod;
|
|
|
4830
4893
|
var IdentityProviderLinkingStrategy;
|
|
4831
4894
|
(function (IdentityProviderLinkingStrategy) {
|
|
4832
4895
|
IdentityProviderLinkingStrategy["CreatePendingLink"] = "CreatePendingLink";
|
|
4896
|
+
IdentityProviderLinkingStrategy["Disabled"] = "Disabled";
|
|
4833
4897
|
IdentityProviderLinkingStrategy["LinkAnonymously"] = "LinkAnonymously";
|
|
4834
4898
|
IdentityProviderLinkingStrategy["LinkByEmail"] = "LinkByEmail";
|
|
4835
4899
|
IdentityProviderLinkingStrategy["LinkByEmailForExistingUser"] = "LinkByEmailForExistingUser";
|
|
@@ -4978,6 +5042,14 @@ var MessengerType;
|
|
|
4978
5042
|
MessengerType["Kafka"] = "Kafka";
|
|
4979
5043
|
MessengerType["Twilio"] = "Twilio";
|
|
4980
5044
|
})(MessengerType = exports.MessengerType || (exports.MessengerType = {}));
|
|
5045
|
+
/**
|
|
5046
|
+
* @author Daniel DeGroff
|
|
5047
|
+
*/
|
|
5048
|
+
var MultiFactorLoginPolicy;
|
|
5049
|
+
(function (MultiFactorLoginPolicy) {
|
|
5050
|
+
MultiFactorLoginPolicy["Disabled"] = "Disabled";
|
|
5051
|
+
MultiFactorLoginPolicy["Enabled"] = "Enabled";
|
|
5052
|
+
})(MultiFactorLoginPolicy = exports.MultiFactorLoginPolicy || (exports.MultiFactorLoginPolicy = {}));
|
|
4981
5053
|
var OAuthErrorReason;
|
|
4982
5054
|
(function (OAuthErrorReason) {
|
|
4983
5055
|
OAuthErrorReason["auth_code_not_found"] = "auth_code_not_found";
|