@fusionauth/typescript-client 1.39.0 → 1.42.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.
@@ -108,6 +108,15 @@ export declare class FusionAuthClient {
108
108
  * @returns {Promise<ClientResponse<void>>}
109
109
  */
110
110
  checkChangePasswordUsingLoginId(loginId: string): Promise<ClientResponse<void>>;
111
+ /**
112
+ * Make a Client Credentials grant request to obtain an access token.
113
+ *
114
+ * @param {string} client_id The client identifier. The client Id is the Id of the FusionAuth Entity in which you are attempting to authenticate.
115
+ * @param {string} client_secret The client secret used to authenticate this request.
116
+ * @param {string} scope (Optional) This parameter is used to indicate which target entity you are requesting access. To request access to an entity, use the format target-entity:&lt;target-entity-id&gt;:&lt;roles&gt;. Roles are an optional comma separated list.
117
+ * @returns {Promise<ClientResponse<AccessToken>>}
118
+ */
119
+ clientCredentialsGrant(client_id: string, client_secret: string, scope: string): Promise<ClientResponse<AccessToken>>;
111
120
  /**
112
121
  * Adds a comment to the user's account.
113
122
  *
@@ -115,6 +124,27 @@ export declare class FusionAuthClient {
115
124
  * @returns {Promise<ClientResponse<void>>}
116
125
  */
117
126
  commentOnUser(request: UserCommentRequest): Promise<ClientResponse<void>>;
127
+ /**
128
+ * Complete a WebAuthn authentication ceremony by validating the signature against the previously generated challenge without logging the user in
129
+ *
130
+ * @param {WebAuthnLoginRequest} request An object containing data necessary for completing the authentication ceremony
131
+ * @returns {Promise<ClientResponse<WebAuthnAssertResponse>>}
132
+ */
133
+ completeWebAuthnAssertion(request: WebAuthnLoginRequest): Promise<ClientResponse<WebAuthnAssertResponse>>;
134
+ /**
135
+ * Complete a WebAuthn authentication ceremony by validating the signature against the previously generated challenge and then login the user in
136
+ *
137
+ * @param {WebAuthnLoginRequest} request An object containing data necessary for completing the authentication ceremony
138
+ * @returns {Promise<ClientResponse<LoginResponse>>}
139
+ */
140
+ completeWebAuthnLogin(request: WebAuthnLoginRequest): Promise<ClientResponse<LoginResponse>>;
141
+ /**
142
+ * Complete a WebAuthn registration ceremony by validating the client request and saving the new credential
143
+ *
144
+ * @param {WebAuthnRegisterCompleteRequest} request An object containing data necessary for completing the registration ceremony
145
+ * @returns {Promise<ClientResponse<WebAuthnRegisterCompleteResponse>>}
146
+ */
147
+ completeWebAuthnRegistration(request: WebAuthnRegisterCompleteRequest): Promise<ClientResponse<WebAuthnRegisterCompleteResponse>>;
118
148
  /**
119
149
  * Creates an API key. You can optionally specify a unique Id for the key, if not provided one will be generated.
120
150
  * an API key can only be created with equal or lesser authority. An API key cannot create another API key unless it is granted
@@ -655,6 +685,13 @@ export declare class FusionAuthClient {
655
685
  * @returns {Promise<ClientResponse<UserDeleteResponse>>}
656
686
  */
657
687
  deleteUsersByQuery(request: UserDeleteRequest): Promise<ClientResponse<UserDeleteResponse>>;
688
+ /**
689
+ * Deletes the WebAuthn credential for the given Id.
690
+ *
691
+ * @param {UUID} id The Id of the WebAuthn credential to delete.
692
+ * @returns {Promise<ClientResponse<void>>}
693
+ */
694
+ deleteWebAuthnCredential(id: UUID): Promise<ClientResponse<void>>;
658
695
  /**
659
696
  * Deletes the webhook for the given Id.
660
697
  *
@@ -663,27 +700,27 @@ export declare class FusionAuthClient {
663
700
  */
664
701
  deleteWebhook(webhookId: UUID): Promise<ClientResponse<void>>;
665
702
  /**
666
- * Disable Two Factor authentication for a user.
703
+ * Disable two-factor authentication for a user.
667
704
  *
668
- * @param {UUID} userId The Id of the User for which you're disabling Two Factor authentication.
705
+ * @param {UUID} userId The Id of the User for which you're disabling two-factor authentication.
669
706
  * @param {string} methodId The two-factor method identifier you wish to disable
670
- * @param {string} code The Two Factor code used verify the the caller knows the Two Factor secret.
707
+ * @param {string} code The two-factor code used verify the the caller knows the two-factor secret.
671
708
  * @returns {Promise<ClientResponse<void>>}
672
709
  */
673
710
  disableTwoFactor(userId: UUID, methodId: string, code: string): Promise<ClientResponse<void>>;
674
711
  /**
675
- * Disable Two Factor authentication for a user using a JSON body rather than URL parameters.
712
+ * Disable two-factor authentication for a user using a JSON body rather than URL parameters.
676
713
  *
677
- * @param {UUID} userId The Id of the User for which you're disabling Two Factor authentication.
714
+ * @param {UUID} userId The Id of the User for which you're disabling two-factor authentication.
678
715
  * @param {TwoFactorDisableRequest} request The request information that contains the code and methodId along with any event information.
679
716
  * @returns {Promise<ClientResponse<void>>}
680
717
  */
681
718
  disableTwoFactorWithRequest(userId: UUID, request: TwoFactorDisableRequest): Promise<ClientResponse<void>>;
682
719
  /**
683
- * Enable Two Factor authentication for a user.
720
+ * Enable two-factor authentication for a user.
684
721
  *
685
- * @param {UUID} userId The Id of the user to enable Two Factor authentication.
686
- * @param {TwoFactorRequest} request The two factor enable request information.
722
+ * @param {UUID} userId The Id of the user to enable two-factor authentication.
723
+ * @param {TwoFactorRequest} request The two-factor enable request information.
687
724
  * @returns {Promise<ClientResponse<TwoFactorResponse>>}
688
725
  */
689
726
  enableTwoFactor(userId: UUID, request: TwoFactorRequest): Promise<ClientResponse<TwoFactorResponse>>;
@@ -692,7 +729,7 @@ export declare class FusionAuthClient {
692
729
  * Makes a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint for an access token.
693
730
  *
694
731
  * @param {string} code The authorization code returned on the /oauth2/authorize response.
695
- * @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.
732
+ * @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.
696
733
  * @param {string} client_secret (Optional) The client secret. This value will be required if client authentication is enabled.
697
734
  * @param {string} redirect_uri The URI to redirect to upon a successful request.
698
735
  * @returns {Promise<ClientResponse<AccessToken>>}
@@ -703,7 +740,7 @@ export declare class FusionAuthClient {
703
740
  * 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.
704
741
  *
705
742
  * @param {string} code The authorization code returned on the /oauth2/authorize response.
706
- * @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.
743
+ * @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.
707
744
  * @param {string} client_secret (Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header.
708
745
  * @param {string} redirect_uri The URI to redirect to upon a successful request.
709
746
  * @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.
@@ -715,7 +752,7 @@ export declare class FusionAuthClient {
715
752
  * 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.
716
753
  *
717
754
  * @param {string} refresh_token The refresh token that you would like to use to exchange for an access token.
718
- * @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.
755
+ * @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.
719
756
  * @param {string} client_secret (Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header.
720
757
  * @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.
721
758
  * @param {string} user_code (Optional) The end-user verification code. This code is required if using this endpoint to approve the Device Authorization.
@@ -735,7 +772,7 @@ export declare class FusionAuthClient {
735
772
  *
736
773
  * @param {string} username The login identifier of the user. The login identifier can be either the email or the username.
737
774
  * @param {string} password The user’s password.
738
- * @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.
775
+ * @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.
739
776
  * @param {string} client_secret (Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header.
740
777
  * @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.
741
778
  * @param {string} user_code (Optional) The end-user verification code. This code is required if using this endpoint to approve the Device Authorization.
@@ -843,6 +880,13 @@ export declare class FusionAuthClient {
843
880
  * @returns {Promise<ClientResponse<void>>}
844
881
  */
845
882
  importUsers(request: ImportRequest): Promise<ClientResponse<void>>;
883
+ /**
884
+ * Import a WebAuthn credential
885
+ *
886
+ * @param {WebAuthnCredentialImportRequest} request An object containing data necessary for importing the credential
887
+ * @returns {Promise<ClientResponse<void>>}
888
+ */
889
+ importWebAuthnCredential(request: WebAuthnCredentialImportRequest): Promise<ClientResponse<void>>;
846
890
  /**
847
891
  * Inspect an access token issued by FusionAuth.
848
892
  *
@@ -1903,6 +1947,20 @@ export declare class FusionAuthClient {
1903
1947
  * @returns {Promise<ClientResponse<VersionResponse>>}
1904
1948
  */
1905
1949
  retrieveVersion(): Promise<ClientResponse<VersionResponse>>;
1950
+ /**
1951
+ * Retrieves the WebAuthn credential for the given Id.
1952
+ *
1953
+ * @param {UUID} id The Id of the WebAuthn credential.
1954
+ * @returns {Promise<ClientResponse<WebAuthnCredentialResponse>>}
1955
+ */
1956
+ retrieveWebAuthnCredential(id: UUID): Promise<ClientResponse<WebAuthnCredentialResponse>>;
1957
+ /**
1958
+ * Retrieves all WebAuthn credentials for the given user.
1959
+ *
1960
+ * @param {UUID} userId The user's ID.
1961
+ * @returns {Promise<ClientResponse<WebAuthnCredentialResponse>>}
1962
+ */
1963
+ retrieveWebAuthnCredentialsForUser(userId: UUID): Promise<ClientResponse<WebAuthnCredentialResponse>>;
1906
1964
  /**
1907
1965
  * Retrieves the webhook for the given Id. If you pass in null for the id, this will return all the webhooks.
1908
1966
  *
@@ -2187,6 +2245,20 @@ export declare class FusionAuthClient {
2187
2245
  * @returns {Promise<ClientResponse<TwoFactorStartResponse>>}
2188
2246
  */
2189
2247
  startTwoFactorLogin(request: TwoFactorStartRequest): Promise<ClientResponse<TwoFactorStartResponse>>;
2248
+ /**
2249
+ * Start a WebAuthn authentication ceremony by generating a new challenge for the user
2250
+ *
2251
+ * @param {WebAuthnStartRequest} request An object containing data necessary for starting the authentication ceremony
2252
+ * @returns {Promise<ClientResponse<WebAuthnStartResponse>>}
2253
+ */
2254
+ startWebAuthnLogin(request: WebAuthnStartRequest): Promise<ClientResponse<WebAuthnStartResponse>>;
2255
+ /**
2256
+ * Start a WebAuthn registration ceremony by generating a new challenge for the user
2257
+ *
2258
+ * @param {WebAuthnRegisterStartRequest} request An object containing data necessary for starting the registration ceremony
2259
+ * @returns {Promise<ClientResponse<WebAuthnRegisterStartResponse>>}
2260
+ */
2261
+ startWebAuthnRegistration(request: WebAuthnRegisterStartRequest): Promise<ClientResponse<WebAuthnRegisterStartResponse>>;
2190
2262
  /**
2191
2263
  * Complete login using a 2FA challenge
2192
2264
  *
@@ -2687,6 +2759,7 @@ export interface Application {
2687
2759
  verificationEmailTemplateId?: UUID;
2688
2760
  verificationStrategy?: VerificationStrategy;
2689
2761
  verifyRegistration?: boolean;
2762
+ webAuthnConfiguration?: ApplicationWebAuthnConfiguration;
2690
2763
  }
2691
2764
  /**
2692
2765
  * @author Daniel DeGroff
@@ -2710,6 +2783,13 @@ export interface ApplicationEmailConfiguration {
2710
2783
  twoFactorMethodAddEmailTemplateId?: UUID;
2711
2784
  twoFactorMethodRemoveEmailTemplateId?: UUID;
2712
2785
  }
2786
+ /**
2787
+ * Events that are bound to applications.
2788
+ *
2789
+ * @author Brian Pontarelli
2790
+ */
2791
+ export interface ApplicationEvent {
2792
+ }
2713
2793
  /**
2714
2794
  * @author Daniel DeGroff
2715
2795
  */
@@ -2789,6 +2869,20 @@ export interface ApplicationUnverifiedConfiguration {
2789
2869
  verificationStrategy?: VerificationStrategy;
2790
2870
  whenGated?: RegistrationUnverifiedOptions;
2791
2871
  }
2872
+ /**
2873
+ * Application-level configuration for WebAuthn
2874
+ *
2875
+ * @author Daniel DeGroff
2876
+ */
2877
+ export interface ApplicationWebAuthnConfiguration extends Enableable {
2878
+ bootstrapWorkflow?: ApplicationWebAuthnWorkflowConfiguration;
2879
+ reauthenticationWorkflow?: ApplicationWebAuthnWorkflowConfiguration;
2880
+ }
2881
+ /**
2882
+ * @author Daniel DeGroff
2883
+ */
2884
+ export interface ApplicationWebAuthnWorkflowConfiguration extends Enableable {
2885
+ }
2792
2886
  /**
2793
2887
  * This class is a simple attachment with a byte array, name and MIME type.
2794
2888
  *
@@ -2799,6 +2893,29 @@ export interface Attachment {
2799
2893
  mime?: string;
2800
2894
  name?: string;
2801
2895
  }
2896
+ /**
2897
+ * Used to communicate whether and how authenticator attestation should be delivered to the Relying Party
2898
+ *
2899
+ * @author Spencer Witt
2900
+ */
2901
+ export declare enum AttestationConveyancePreference {
2902
+ none = "none",
2903
+ indirect = "indirect",
2904
+ direct = "direct",
2905
+ enterprise = "enterprise"
2906
+ }
2907
+ /**
2908
+ * Used to indicate what type of attestation was included in the authenticator response for a given WebAuthn credential at the time it was created
2909
+ *
2910
+ * @author Spencer Witt
2911
+ */
2912
+ export declare enum AttestationType {
2913
+ basic = "basic",
2914
+ self = "self",
2915
+ attestationCa = "attestationCa",
2916
+ anonymizationCa = "anonymizationCa",
2917
+ none = "none"
2918
+ }
2802
2919
  /**
2803
2920
  * An audit log.
2804
2921
  *
@@ -2880,6 +2997,25 @@ export declare enum AuthenticationThreats {
2880
2997
  }
2881
2998
  export interface AuthenticationTokenConfiguration extends Enableable {
2882
2999
  }
3000
+ /**
3001
+ * Describes the <a href="https://www.w3.org/TR/webauthn-2/#authenticator-attachment-modality">authenticator attachment modality</a>.
3002
+ *
3003
+ * @author Spencer Witt
3004
+ */
3005
+ export declare enum AuthenticatorAttachment {
3006
+ platform = "platform",
3007
+ crossPlatform = "crossPlatform"
3008
+ }
3009
+ /**
3010
+ * Describes the authenticator attachment modality preference for a WebAuthn workflow. See {@link AuthenticatorAttachment}
3011
+ *
3012
+ * @author Spencer Witt
3013
+ */
3014
+ export declare enum AuthenticatorAttachmentPreference {
3015
+ any = "any",
3016
+ platform = "platform",
3017
+ crossPlatform = "crossPlatform"
3018
+ }
2883
3019
  /**
2884
3020
  * @author Daniel DeGroff
2885
3021
  */
@@ -2888,6 +3024,18 @@ export interface AuthenticatorConfiguration {
2888
3024
  codeLength?: number;
2889
3025
  timeStep?: number;
2890
3026
  }
3027
+ /**
3028
+ * Used by the Relying Party to specify their requirements for authenticator attributes. Fields use the deprecated "resident key" terminology to refer
3029
+ * to client-side discoverable credentials to maintain backwards compatibility with WebAuthn Level 1.
3030
+ *
3031
+ * @author Spencer Witt
3032
+ */
3033
+ export interface AuthenticatorSelectionCriteria {
3034
+ authenticatorAttachment?: AuthenticatorAttachment;
3035
+ requireResidentKey?: boolean;
3036
+ residentKey?: ResidentKeyRequirement;
3037
+ userVerification?: UserVerificationRequirement;
3038
+ }
2891
3039
  export interface BaseConnectorConfiguration {
2892
3040
  data?: Record<string, any>;
2893
3041
  debug?: boolean;
@@ -3202,6 +3350,51 @@ export interface CORSConfiguration extends Enableable {
3202
3350
  exposedHeaders?: Array<string>;
3203
3351
  preflightMaxAgeInSeconds?: number;
3204
3352
  }
3353
+ /**
3354
+ * A number identifying a cryptographic algorithm. Values should be registered with the <a
3355
+ * href="https://www.iana.org/assignments/cose/cose.xhtml#algorithms">IANA COSE Algorithms registry</a>
3356
+ *
3357
+ * @author Spencer Witt
3358
+ */
3359
+ export declare enum CoseAlgorithmIdentifier {
3360
+ ES256 = "SHA256withECDSA",
3361
+ ES384 = "SHA384withECDSA",
3362
+ ES512 = "SHA512withECDSA",
3363
+ RS256 = "SHA256withRSA",
3364
+ RS384 = "SHA384withRSA",
3365
+ RS512 = "SHA512withRSA",
3366
+ PS256 = "SHA-256",
3367
+ PS384 = "SHA-384",
3368
+ PS512 = "SHA-512"
3369
+ }
3370
+ /**
3371
+ * COSE Elliptic Curve identifier to determine which elliptic curve to use with a given key
3372
+ *
3373
+ * @author Spencer Witt
3374
+ */
3375
+ export declare enum CoseEllipticCurve {
3376
+ Reserved = "Reserved",
3377
+ P256 = "P256",
3378
+ P384 = "P384",
3379
+ P521 = "P521",
3380
+ X25519 = "X25519",
3381
+ X448 = "X448",
3382
+ Ed25519 = "Ed25519",
3383
+ Ed448 = "Ed448",
3384
+ Secp256k1 = "Secp256k1"
3385
+ }
3386
+ /**
3387
+ * COSE key type
3388
+ *
3389
+ * @author Spencer Witt
3390
+ */
3391
+ export declare enum CoseKeyType {
3392
+ Reserved = "0",
3393
+ OKP = "1",
3394
+ EC2 = "2",
3395
+ RSA = "3",
3396
+ Symmetric = "4"
3397
+ }
3205
3398
  /**
3206
3399
  * @author Brian Pontarelli
3207
3400
  */
@@ -3209,6 +3402,14 @@ export interface Count {
3209
3402
  count?: number;
3210
3403
  interval?: number;
3211
3404
  }
3405
+ /**
3406
+ * Contains the output for the {@code credProps} extension
3407
+ *
3408
+ * @author Spencer Witt
3409
+ */
3410
+ export interface CredentialPropertiesOutput {
3411
+ rk?: boolean;
3412
+ }
3212
3413
  /**
3213
3414
  * Response for the daily active user report.
3214
3415
  *
@@ -3831,6 +4032,8 @@ export interface ExternalIdentifierConfiguration {
3831
4032
  twoFactorOneTimeCodeIdGenerator?: SecureGeneratorConfiguration;
3832
4033
  twoFactorOneTimeCodeIdTimeToLiveInSeconds?: number;
3833
4034
  twoFactorTrustIdTimeToLiveInSeconds?: number;
4035
+ webAuthnAuthenticationChallengeTimeToLiveInSeconds?: number;
4036
+ webAuthnRegistrationChallengeTimeToLiveInSeconds?: number;
3834
4037
  }
3835
4038
  /**
3836
4039
  * @author Daniel DeGroff
@@ -3874,14 +4077,24 @@ export interface FacebookIdentityProvider extends BaseIdentityProvider<FacebookA
3874
4077
  loginMethod?: IdentityProviderLoginMethod;
3875
4078
  permissions?: string;
3876
4079
  }
4080
+ /**
4081
+ * A policy to configure if and when the user-action is canceled prior to the expiration of the action.
4082
+ *
4083
+ * @author Daniel DeGroff
4084
+ */
4085
+ export interface FailedAuthenticationActionCancelPolicy {
4086
+ onPasswordReset?: boolean;
4087
+ }
3877
4088
  /**
3878
4089
  * Configuration for the behavior of failed login attempts. This helps us protect against brute force password attacks.
3879
4090
  *
3880
4091
  * @author Daniel DeGroff
3881
4092
  */
3882
4093
  export interface FailedAuthenticationConfiguration {
4094
+ actionCancelPolicy?: FailedAuthenticationActionCancelPolicy;
3883
4095
  actionDuration?: number;
3884
4096
  actionDurationUnit?: ExpiryUnit;
4097
+ emailUser?: boolean;
3885
4098
  resetCountInSeconds?: number;
3886
4099
  tooManyAttempts?: number;
3887
4100
  userActionId?: UUID;
@@ -4328,7 +4541,6 @@ export interface GroupResponse {
4328
4541
  * @author Daniel DeGroff
4329
4542
  */
4330
4543
  export interface GroupSearchCriteria extends BaseSearchCriteria {
4331
- id?: UUID;
4332
4544
  name?: string;
4333
4545
  tenantId?: UUID;
4334
4546
  }
@@ -5145,6 +5357,7 @@ export interface LoginResponse {
5145
5357
  actions?: Array<LoginPreventedResponse>;
5146
5358
  changePasswordId?: string;
5147
5359
  changePasswordReason?: ChangePasswordReason;
5360
+ configurableMethods?: Array<string>;
5148
5361
  emailVerificationId?: string;
5149
5362
  methods?: Array<TwoFactorMethod>;
5150
5363
  pendingIdPLinkId?: string;
@@ -5289,6 +5502,7 @@ export declare enum MessengerType {
5289
5502
  Twilio = "Twilio"
5290
5503
  }
5291
5504
  export interface MetaData {
5505
+ data?: Record<string, any>;
5292
5506
  device?: DeviceInfo;
5293
5507
  scopes?: Array<string>;
5294
5508
  }
@@ -5323,7 +5537,8 @@ export interface MultiFactorEmailTemplate {
5323
5537
  */
5324
5538
  export declare enum MultiFactorLoginPolicy {
5325
5539
  Disabled = "Disabled",
5326
- Enabled = "Enabled"
5540
+ Enabled = "Enabled",
5541
+ Required = "Required"
5327
5542
  }
5328
5543
  export interface MultiFactorSMSMethod extends Enableable {
5329
5544
  messengerId?: UUID;
@@ -5665,6 +5880,84 @@ export declare enum ProofKeyForCodeExchangePolicy {
5665
5880
  NotRequired = "NotRequired",
5666
5881
  NotRequiredWhenUsingClientAuthentication = "NotRequiredWhenUsingClientAuthentication"
5667
5882
  }
5883
+ /**
5884
+ * Allows the Relying Party to specify desired attributes of a new credential.
5885
+ *
5886
+ * @author Spencer Witt
5887
+ */
5888
+ export interface PublicKeyCredentialCreationOptions {
5889
+ attestation?: AttestationConveyancePreference;
5890
+ authenticatorSelection?: AuthenticatorSelectionCriteria;
5891
+ challenge?: string;
5892
+ excludeCredentials?: Array<PublicKeyCredentialDescriptor>;
5893
+ extensions?: WebAuthnRegistrationExtensionOptions;
5894
+ pubKeyCredParams?: Array<PublicKeyCredentialParameters>;
5895
+ rp?: PublicKeyCredentialRelyingPartyEntity;
5896
+ timeout?: number;
5897
+ user?: PublicKeyCredentialUserEntity;
5898
+ }
5899
+ /**
5900
+ * Contains attributes for the Relying Party to refer to an existing public key credential as an input parameter.
5901
+ *
5902
+ * @author Spencer Witt
5903
+ */
5904
+ export interface PublicKeyCredentialDescriptor {
5905
+ id?: string;
5906
+ transports?: Array<string>;
5907
+ type?: PublicKeyCredentialType;
5908
+ }
5909
+ /**
5910
+ * Describes a user account or WebAuthn Relying Party associated with a public key credential
5911
+ */
5912
+ export interface PublicKeyCredentialEntity {
5913
+ name?: string;
5914
+ }
5915
+ /**
5916
+ * Supply information on credential type and algorithm to the <i>authenticator</i>.
5917
+ *
5918
+ * @author Spencer Witt
5919
+ */
5920
+ export interface PublicKeyCredentialParameters {
5921
+ alg?: CoseAlgorithmIdentifier;
5922
+ type?: PublicKeyCredentialType;
5923
+ }
5924
+ /**
5925
+ * Supply additional information about the Relying Party when creating a new credential
5926
+ *
5927
+ * @author Spencer Witt
5928
+ */
5929
+ export interface PublicKeyCredentialRelyingPartyEntity extends PublicKeyCredentialEntity {
5930
+ id?: string;
5931
+ }
5932
+ /**
5933
+ * Provides the <i>authenticator</i> with the data it needs to generate an assertion.
5934
+ *
5935
+ * @author Spencer Witt
5936
+ */
5937
+ export interface PublicKeyCredentialRequestOptions {
5938
+ allowCredentials?: Array<PublicKeyCredentialDescriptor>;
5939
+ challenge?: string;
5940
+ rpId?: string;
5941
+ timeout?: number;
5942
+ userVerification?: UserVerificationRequirement;
5943
+ }
5944
+ /**
5945
+ * Defines valid credential types. This is an extension point in the WebAuthn spec. The only defined value at this time is "public-key"
5946
+ *
5947
+ * @author Spencer Witt
5948
+ */
5949
+ export declare enum PublicKeyCredentialType {
5950
+ publicKey = "public-key"
5951
+ }
5952
+ /**
5953
+ * Supply additional information about the user account when creating a new credential
5954
+ *
5955
+ * @author Spencer Witt
5956
+ */
5957
+ export interface PublicKeyCredentialUserEntity extends PublicKeyCredentialEntity {
5958
+ displayName?: string;
5959
+ id?: string;
5960
+ }
5668
5961
  /**
5669
5962
  * JWT Public Key Response Object
5670
5963
  *
@@ -5758,6 +6051,9 @@ export interface ReactorStatus {
5758
6051
  licensed?: boolean;
5759
6052
  scimServer?: ReactorFeatureStatus;
5760
6053
  threatDetection?: ReactorFeatureStatus;
6054
+ webAuthn?: ReactorFeatureStatus;
6055
+ webAuthnPlatformAuthenticators?: ReactorFeatureStatus;
6056
+ webAuthnRoamingAuthenticators?: ReactorFeatureStatus;
5761
6057
  }
5762
6058
  /**
5763
6059
  * Response for the user login report.
@@ -5825,6 +6121,7 @@ export interface RefreshTokenResponse {
5825
6121
  */
5826
6122
  export interface RefreshTokenRevocationPolicy {
5827
6123
  onLoginPrevented?: boolean;
6124
+ onMultiFactorEnable?: boolean;
5828
6125
  onPasswordChanged?: boolean;
5829
6126
  }
5830
6127
  /**
@@ -5945,6 +6242,17 @@ export interface Requirable extends Enableable {
5945
6242
  */
5946
6243
  export interface RequiresCORSConfiguration {
5947
6244
  }
6245
+ /**
6246
+ * Describes the Relying Party's requirements for <a href="https://www.w3.org/TR/webauthn-2/#client-side-discoverable-credential">client-side
6247
+ * discoverable credentials</a> (formerly known as "resident keys")
6248
+ *
6249
+ * @author Spencer Witt
6250
+ */
6251
+ export declare enum ResidentKeyRequirement {
6252
+ discouraged = "discouraged",
6253
+ preferred = "preferred",
6254
+ required = "required"
6255
+ }
5948
6256
  export declare enum SAMLLogoutBehavior {
5949
6257
  AllParticipants = "AllParticipants",
5950
6258
  OnlyOriginator = "OnlyOriginator"
@@ -5962,6 +6270,7 @@ export interface SAMLv2Configuration extends Enableable {
5962
6270
  callbackURL?: string;
5963
6271
  debug?: boolean;
5964
6272
  defaultVerificationKeyId?: UUID;
6273
+ initiatedLogin?: SAMLv2IdPInitiatedLoginConfiguration;
5965
6274
  issuer?: string;
5966
6275
  keyId?: UUID;
5967
6276
  logout?: SAMLv2Logout;
@@ -6010,6 +6319,14 @@ export interface SAMLv2IdPInitiatedIdentityProvider extends BaseIdentityProvider
6010
6319
  useNameIdForEmail?: boolean;
6011
6320
  usernameClaim?: string;
6012
6321
  }
6322
+ /**
6323
+ * IdP Initiated login configuration
6324
+ *
6325
+ * @author Daniel DeGroff
6326
+ */
6327
+ export interface SAMLv2IdPInitiatedLoginConfiguration extends Enableable {
6328
+ nameIdFormat?: string;
6329
+ }
6013
6330
  export interface SAMLv2Logout {
6014
6331
  behavior?: SAMLLogoutBehavior;
6015
6332
  defaultVerificationKeyId?: UUID;
@@ -6231,6 +6548,9 @@ export interface Templates {
6231
6548
  accountTwoFactorDisable?: string;
6232
6549
  accountTwoFactorEnable?: string;
6233
6550
  accountTwoFactorIndex?: string;
6551
+ accountWebAuthnAdd?: string;
6552
+ accountWebAuthnDelete?: string;
6553
+ accountWebAuthnIndex?: string;
6234
6554
  emailComplete?: string;
6235
6555
  emailSend?: string;
6236
6556
  emailSent?: string;
@@ -6251,8 +6571,13 @@ export interface Templates {
6251
6571
  oauth2Register?: string;
6252
6572
  oauth2StartIdPLink?: string;
6253
6573
  oauth2TwoFactor?: string;
6574
+ oauth2TwoFactorEnable?: string;
6575
+ oauth2TwoFactorEnableComplete?: string;
6254
6576
  oauth2TwoFactorMethods?: string;
6255
6577
  oauth2Wait?: string;
6578
+ oauth2WebAuthn?: string;
6579
+ oauth2WebAuthnReauth?: string;
6580
+ oauth2WebAuthnReauthEnable?: string;
6256
6581
  passwordChange?: string;
6257
6582
  passwordComplete?: string;
6258
6583
  passwordForgot?: string;
@@ -6304,6 +6629,7 @@ export interface Tenant {
6304
6629
  themeId?: UUID;
6305
6630
  userDeletePolicy?: TenantUserDeletePolicy;
6306
6631
  usernameConfiguration?: TenantUsernameConfiguration;
6632
+ webAuthnConfiguration?: TenantWebAuthnConfiguration;
6307
6633
  }
6308
6634
  /**
6309
6635
  * @author Brian Pontarelli
@@ -6435,6 +6761,25 @@ export interface TenantUserDeletePolicy {
6435
6761
  export interface TenantUsernameConfiguration {
6436
6762
  unique?: UniqueUsernameConfiguration;
6437
6763
  }
6764
+ /**
6765
+ * Tenant-level configuration for WebAuthn
6766
+ *
6767
+ * @author Spencer Witt
6768
+ */
6769
+ export interface TenantWebAuthnConfiguration extends Enableable {
6770
+ bootstrapWorkflow?: TenantWebAuthnWorkflowConfiguration;
6771
+ debug?: boolean;
6772
+ reauthenticationWorkflow?: TenantWebAuthnWorkflowConfiguration;
6773
+ relyingPartyId?: string;
6774
+ relyingPartyName?: string;
6775
+ }
6776
+ /**
6777
+ * @author Spencer Witt
6778
+ */
6779
+ export interface TenantWebAuthnWorkflowConfiguration extends Enableable {
6780
+ authenticatorAttachmentPreference?: AuthenticatorAttachmentPreference;
6781
+ userVerificationRequirement?: UserVerificationRequirement;
6782
+ }
6438
6783
  /**
6439
6784
  * @author Daniel DeGroff
6440
6785
  */
@@ -6632,11 +6977,13 @@ export interface TwoFactorRequest extends BaseEventRequest {
6632
6977
  mobilePhone?: string;
6633
6978
  secret?: string;
6634
6979
  secretBase32Encoded?: string;
6980
+ twoFactorId?: string;
6635
6981
  }
6636
6982
  /**
6637
6983
  * @author Daniel DeGroff
6638
6984
  */
6639
6985
  export interface TwoFactorResponse {
6986
+ code?: string;
6640
6987
  recoveryCodes?: Array<string>;
6641
6988
  }
6642
6989
  /**
@@ -7352,6 +7699,17 @@ export interface UserUpdateEvent extends BaseEvent {
7352
7699
  original?: User;
7353
7700
  user?: User;
7354
7701
  }
7702
+ /**
7703
+ * Used to express whether the Relying Party requires <a href="https://www.w3.org/TR/webauthn-2/#user-verification">user verification</a> for the
7704
+ * current operation.
7705
+ *
7706
+ * @author Spencer Witt
7707
+ */
7708
+ export declare enum UserVerificationRequirement {
7709
+ required = "required",
7710
+ preferred = "preferred",
7711
+ discouraged = "discouraged"
7712
+ }
7355
7713
  /**
7356
7714
  * @author Daniel DeGroff
7357
7715
  */
@@ -7400,6 +7758,200 @@ export interface VerifyRegistrationResponse {
7400
7758
  export interface VersionResponse {
7401
7759
  version?: string;
7402
7760
  }
7761
+ /**
7762
+ * API response for completing WebAuthn assertion
7763
+ *
7764
+ * @author Spencer Witt
7765
+ */
7766
+ export interface WebAuthnAssertResponse {
7767
+ credential?: WebAuthnCredential;
7768
+ }
7769
+ /**
7770
+ * The <i>authenticator's</i> response for the authentication ceremony in its encoded format
7771
+ *
7772
+ * @author Spencer Witt
7773
+ */
7774
+ export interface WebAuthnAuthenticatorAuthenticationResponse {
7775
+ authenticatorData?: string;
7776
+ clientDataJSON?: string;
7777
+ signature?: string;
7778
+ userHandle?: string;
7779
+ }
7780
+ /**
7781
+ * The <i>authenticator's</i> response for the registration ceremony in its encoded format
7782
+ *
7783
+ * @author Spencer Witt
7784
+ */
7785
+ export interface WebAuthnAuthenticatorRegistrationResponse {
7786
+ attestationObject?: string;
7787
+ clientDataJSON?: string;
7788
+ }
7789
+ /**
7790
+ * A User's WebAuthnCredential. Contains all data required to complete WebAuthn authentication ceremonies.
7791
+ *
7792
+ * @author Spencer Witt
7793
+ */
7794
+ export interface WebAuthnCredential {
7795
+ algorithm?: CoseAlgorithmIdentifier;
7796
+ attestationType?: AttestationType;
7797
+ authenticatorSupportsUserVerification?: boolean;
7798
+ credentialId?: string;
7799
+ data?: Record<string, any>;
7800
+ discoverable?: boolean;
7801
+ displayName?: string;
7802
+ id?: UUID;
7803
+ insertInstant?: number;
7804
+ lastUseInstant?: number;
7805
+ name?: string;
7806
+ publicKey?: string;
7807
+ relyingPartyId?: string;
7808
+ signCount?: number;
7809
+ tenantId?: UUID;
7810
+ transports?: Array<string>;
7811
+ userAgent?: string;
7812
+ userId?: UUID;
7813
+ }
7814
+ /**
7815
+ * API request to import an existing WebAuthn credential(s)
7816
+ *
7817
+ * @author Spencer Witt
7818
+ */
7819
+ export interface WebAuthnCredentialImportRequest {
7820
+ credentials?: Array<WebAuthnCredential>;
7821
+ validateDbConstraints?: boolean;
7822
+ }
7823
+ /**
7824
+ * WebAuthn Credential API response
7825
+ *
7826
+ * @author Spencer Witt
7827
+ */
7828
+ export interface WebAuthnCredentialResponse {
7829
+ credential?: WebAuthnCredential;
7830
+ credentials?: Array<WebAuthnCredential>;
7831
+ }
7832
+ /**
7833
+ * Contains extension output for requested extensions during a WebAuthn ceremony
7834
+ *
7835
+ * @author Spencer Witt
7836
+ */
7837
+ export interface WebAuthnExtensionsClientOutputs {
7838
+ credProps?: CredentialPropertiesOutput;
7839
+ }
7840
+ /**
7841
+ * Request to complete the WebAuthn registration ceremony
7842
+ *
7843
+ * @author Spencer Witt
7844
+ */
7845
+ export interface WebAuthnLoginRequest extends BaseLoginRequest {
7846
+ credential?: WebAuthnPublicKeyAuthenticationRequest;
7847
+ origin?: string;
7848
+ rpId?: string;
7849
+ twoFactorTrustId?: string;
7850
+ }
7851
+ /**
7852
+ * Request to authenticate with WebAuthn
7853
+ *
7854
+ * @author Spencer Witt
7855
+ */
7856
+ export interface WebAuthnPublicKeyAuthenticationRequest {
7857
+ clientExtensionResults?: WebAuthnExtensionsClientOutputs;
7858
+ id?: string;
7859
+ response?: WebAuthnAuthenticatorAuthenticationResponse;
7860
+ rpId?: string;
7861
+ type?: string;
7862
+ }
7863
+ /**
7864
+ * Request to register a new public key with WebAuthn
7865
+ *
7866
+ * @author Spencer Witt
7867
+ */
7868
+ export interface WebAuthnPublicKeyRegistrationRequest {
7869
+ clientExtensionResults?: WebAuthnExtensionsClientOutputs;
7870
+ id?: string;
7871
+ response?: WebAuthnAuthenticatorRegistrationResponse;
7872
+ rpId?: string;
7873
+ transports?: Array<string>;
7874
+ type?: string;
7875
+ }
7876
+ /**
7877
+ * Request to complete the WebAuthn registration ceremony for a new credential,.
7878
+ *
7879
+ * @author Spencer Witt
7880
+ */
7881
+ export interface WebAuthnRegisterCompleteRequest {
7882
+ credential?: WebAuthnPublicKeyRegistrationRequest;
7883
+ origin?: string;
7884
+ rpId?: string;
7885
+ userId?: UUID;
7886
+ }
7887
+ /**
7888
+ * API response for completing WebAuthn credential registration or assertion
7889
+ *
7890
+ * @author Spencer Witt
7891
+ */
7892
+ export interface WebAuthnRegisterCompleteResponse {
7893
+ credential?: WebAuthnCredential;
7894
+ }
7895
+ /**
7896
+ * API request to start a WebAuthn registration ceremony
7897
+ *
7898
+ * @author Spencer Witt
7899
+ */
7900
+ export interface WebAuthnRegisterStartRequest {
7901
+ displayName?: string;
7902
+ name?: string;
7903
+ userAgent?: string;
7904
+ userId?: UUID;
7905
+ workflow?: WebAuthnWorkflow;
7906
+ }
7907
+ /**
7908
+ * API response for starting a WebAuthn registration ceremony
7909
+ *
7910
+ * @author Spencer Witt
7911
+ */
7912
+ export interface WebAuthnRegisterStartResponse {
7913
+ options?: PublicKeyCredentialCreationOptions;
7914
+ }
7915
+ /**
7916
+ * Options to request extensions during credential registration
7917
+ *
7918
+ * @author Spencer Witt
7919
+ */
7920
+ export interface WebAuthnRegistrationExtensionOptions {
7921
+ credProps?: boolean;
7922
+ }
7923
+ /**
7924
+ * API request to start a WebAuthn authentication ceremony
7925
+ *
7926
+ * @author Spencer Witt
7927
+ */
7928
+ export interface WebAuthnStartRequest {
7929
+ applicationId?: UUID;
7930
+ credentialId?: UUID;
7931
+ loginId?: string;
7932
+ state?: Record<string, any>;
7933
+ userId?: UUID;
7934
+ workflow?: WebAuthnWorkflow;
7935
+ }
7936
+ /**
7937
+ * API response for starting a WebAuthn authentication ceremony
7938
+ *
7939
+ * @author Spencer Witt
7940
+ */
7941
+ export interface WebAuthnStartResponse {
7942
+ options?: PublicKeyCredentialRequestOptions;
7943
+ }
7944
+ /**
7945
+ * Identifies the WebAuthn workflow. This will affect the parameters used for credential creation
7946
+ * and request based on the Tenant configuration.
7947
+ *
7948
+ * @author Spencer Witt
7949
+ */
7950
+ export declare enum WebAuthnWorkflow {
7951
+ bootstrap = "bootstrap",
7952
+ general = "general",
7953
+ reauthentication = "reauthentication"
7954
+ }
7403
7955
  /**
7404
7956
  * A server where events are sent. This includes user action events and any other events sent by FusionAuth.
7405
7957
  *