@fusionauth/typescript-client 1.38.0 → 1.41.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
  *
@@ -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
  *
@@ -2048,6 +2106,13 @@ export declare class FusionAuthClient {
2048
2106
  * @returns {Promise<ClientResponse<GroupMemberSearchResponse>>}
2049
2107
  */
2050
2108
  searchGroupMembers(request: GroupMemberSearchRequest): Promise<ClientResponse<GroupMemberSearchResponse>>;
2109
+ /**
2110
+ * Searches groups with the specified criteria and pagination.
2111
+ *
2112
+ * @param {GroupSearchRequest} request The search criteria and pagination information.
2113
+ * @returns {Promise<ClientResponse<GroupSearchResponse>>}
2114
+ */
2115
+ searchGroups(request: GroupSearchRequest): Promise<ClientResponse<GroupSearchResponse>>;
2051
2116
  /**
2052
2117
  * Searches the IP Access Control Lists with the specified criteria and pagination.
2053
2118
  *
@@ -2180,6 +2245,20 @@ export declare class FusionAuthClient {
2180
2245
  * @returns {Promise<ClientResponse<TwoFactorStartResponse>>}
2181
2246
  */
2182
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>>;
2183
2262
  /**
2184
2263
  * Complete login using a 2FA challenge
2185
2264
  *
@@ -2680,6 +2759,7 @@ export interface Application {
2680
2759
  verificationEmailTemplateId?: UUID;
2681
2760
  verificationStrategy?: VerificationStrategy;
2682
2761
  verifyRegistration?: boolean;
2762
+ webAuthnConfiguration?: ApplicationWebAuthnConfiguration;
2683
2763
  }
2684
2764
  /**
2685
2765
  * @author Daniel DeGroff
@@ -2703,6 +2783,13 @@ export interface ApplicationEmailConfiguration {
2703
2783
  twoFactorMethodAddEmailTemplateId?: UUID;
2704
2784
  twoFactorMethodRemoveEmailTemplateId?: UUID;
2705
2785
  }
2786
+ /**
2787
+ * Events that are bound to applications.
2788
+ *
2789
+ * @author Brian Pontarelli
2790
+ */
2791
+ export interface ApplicationEvent {
2792
+ }
2706
2793
  /**
2707
2794
  * @author Daniel DeGroff
2708
2795
  */
@@ -2782,6 +2869,20 @@ export interface ApplicationUnverifiedConfiguration {
2782
2869
  verificationStrategy?: VerificationStrategy;
2783
2870
  whenGated?: RegistrationUnverifiedOptions;
2784
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
+ }
2785
2886
  /**
2786
2887
  * This class is a simple attachment with a byte array, name and MIME type.
2787
2888
  *
@@ -2792,6 +2893,29 @@ export interface Attachment {
2792
2893
  mime?: string;
2793
2894
  name?: string;
2794
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
+ }
2795
2919
  /**
2796
2920
  * An audit log.
2797
2921
  *
@@ -2873,6 +2997,25 @@ export declare enum AuthenticationThreats {
2873
2997
  }
2874
2998
  export interface AuthenticationTokenConfiguration extends Enableable {
2875
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
+ }
2876
3019
  /**
2877
3020
  * @author Daniel DeGroff
2878
3021
  */
@@ -2881,6 +3024,18 @@ export interface AuthenticatorConfiguration {
2881
3024
  codeLength?: number;
2882
3025
  timeStep?: number;
2883
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
+ }
2884
3039
  export interface BaseConnectorConfiguration {
2885
3040
  data?: Record<string, any>;
2886
3041
  debug?: boolean;
@@ -3195,6 +3350,51 @@ export interface CORSConfiguration extends Enableable {
3195
3350
  exposedHeaders?: Array<string>;
3196
3351
  preflightMaxAgeInSeconds?: number;
3197
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
+ }
3198
3398
  /**
3199
3399
  * @author Brian Pontarelli
3200
3400
  */
@@ -3202,6 +3402,14 @@ export interface Count {
3202
3402
  count?: number;
3203
3403
  interval?: number;
3204
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
+ }
3205
3413
  /**
3206
3414
  * Response for the daily active user report.
3207
3415
  *
@@ -3824,6 +4032,8 @@ export interface ExternalIdentifierConfiguration {
3824
4032
  twoFactorOneTimeCodeIdGenerator?: SecureGeneratorConfiguration;
3825
4033
  twoFactorOneTimeCodeIdTimeToLiveInSeconds?: number;
3826
4034
  twoFactorTrustIdTimeToLiveInSeconds?: number;
4035
+ webAuthnAuthenticationChallengeTimeToLiveInSeconds?: number;
4036
+ webAuthnRegistrationChallengeTimeToLiveInSeconds?: number;
3827
4037
  }
3828
4038
  /**
3829
4039
  * @author Daniel DeGroff
@@ -4315,6 +4525,32 @@ export interface GroupResponse {
4315
4525
  group?: Group;
4316
4526
  groups?: Array<Group>;
4317
4527
  }
4528
+ /**
4529
+ * Search criteria for Groups
4530
+ *
4531
+ * @author Daniel DeGroff
4532
+ */
4533
+ export interface GroupSearchCriteria extends BaseSearchCriteria {
4534
+ name?: string;
4535
+ tenantId?: UUID;
4536
+ }
4537
+ /**
4538
+ * Search request for Groups.
4539
+ *
4540
+ * @author Daniel DeGroff
4541
+ */
4542
+ export interface GroupSearchRequest {
4543
+ search?: GroupSearchCriteria;
4544
+ }
4545
+ /**
4546
+ * Search response for Groups
4547
+ *
4548
+ * @author Daniel DeGroff
4549
+ */
4550
+ export interface GroupSearchResponse {
4551
+ groups?: Array<Group>;
4552
+ total?: number;
4553
+ }
4318
4554
  /**
4319
4555
  * Models the Group Update Complete Event.
4320
4556
  *
@@ -5255,6 +5491,7 @@ export declare enum MessengerType {
5255
5491
  Twilio = "Twilio"
5256
5492
  }
5257
5493
  export interface MetaData {
5494
+ data?: Record<string, any>;
5258
5495
  device?: DeviceInfo;
5259
5496
  scopes?: Array<string>;
5260
5497
  }
@@ -5631,6 +5868,84 @@ export declare enum ProofKeyForCodeExchangePolicy {
5631
5868
  NotRequired = "NotRequired",
5632
5869
  NotRequiredWhenUsingClientAuthentication = "NotRequiredWhenUsingClientAuthentication"
5633
5870
  }
5871
+ /**
5872
+ * Allows the Relying Party to specify desired attributes of a new credential.
5873
+ *
5874
+ * @author Spencer Witt
5875
+ */
5876
+ export interface PublicKeyCredentialCreationOptions {
5877
+ attestation?: AttestationConveyancePreference;
5878
+ authenticatorSelection?: AuthenticatorSelectionCriteria;
5879
+ challenge?: string;
5880
+ excludeCredentials?: Array<PublicKeyCredentialDescriptor>;
5881
+ extensions?: WebAuthnRegistrationExtensionOptions;
5882
+ pubKeyCredParams?: Array<PublicKeyCredentialParameters>;
5883
+ rp?: PublicKeyCredentialRelyingPartyEntity;
5884
+ timeout?: number;
5885
+ user?: PublicKeyCredentialUserEntity;
5886
+ }
5887
+ /**
5888
+ * Contains attributes for the Relying Party to refer to an existing public key credential as an input parameter.
5889
+ *
5890
+ * @author Spencer Witt
5891
+ */
5892
+ export interface PublicKeyCredentialDescriptor {
5893
+ id?: string;
5894
+ transports?: Array<string>;
5895
+ type?: PublicKeyCredentialType;
5896
+ }
5897
+ /**
5898
+ * Describes a user account or WebAuthn Relying Party associated with a public key credential
5899
+ */
5900
+ export interface PublicKeyCredentialEntity {
5901
+ name?: string;
5902
+ }
5903
+ /**
5904
+ * Supply information on credential type and algorithm to the <i>authenticator</i>.
5905
+ *
5906
+ * @author Spencer Witt
5907
+ */
5908
+ export interface PublicKeyCredentialParameters {
5909
+ alg?: CoseAlgorithmIdentifier;
5910
+ type?: PublicKeyCredentialType;
5911
+ }
5912
+ /**
5913
+ * Supply additional information about the Relying Party when creating a new credential
5914
+ *
5915
+ * @author Spencer Witt
5916
+ */
5917
+ export interface PublicKeyCredentialRelyingPartyEntity extends PublicKeyCredentialEntity {
5918
+ id?: string;
5919
+ }
5920
+ /**
5921
+ * Provides the <i>authenticator</i> with the data it needs to generate an assertion.
5922
+ *
5923
+ * @author Spencer Witt
5924
+ */
5925
+ export interface PublicKeyCredentialRequestOptions {
5926
+ allowCredentials?: Array<PublicKeyCredentialDescriptor>;
5927
+ challenge?: string;
5928
+ rpId?: string;
5929
+ timeout?: number;
5930
+ userVerification?: UserVerificationRequirement;
5931
+ }
5932
+ /**
5933
+ * Defines valid credential types. This is an extension point in the WebAuthn spec. The only defined value at this time is "public-key"
5934
+ *
5935
+ * @author Spencer Witt
5936
+ */
5937
+ export declare enum PublicKeyCredentialType {
5938
+ publicKey = "public-key"
5939
+ }
5940
+ /**
5941
+ * Supply additional information about the user account when creating a new credential
5942
+ *
5943
+ * @author Spencer Witt
5944
+ */
5945
+ export interface PublicKeyCredentialUserEntity extends PublicKeyCredentialEntity {
5946
+ displayName?: string;
5947
+ id?: string;
5948
+ }
5634
5949
  /**
5635
5950
  * JWT Public Key Response Object
5636
5951
  *
@@ -5724,6 +6039,9 @@ export interface ReactorStatus {
5724
6039
  licensed?: boolean;
5725
6040
  scimServer?: ReactorFeatureStatus;
5726
6041
  threatDetection?: ReactorFeatureStatus;
6042
+ webAuthn?: ReactorFeatureStatus;
6043
+ webAuthnPlatformAuthenticators?: ReactorFeatureStatus;
6044
+ webAuthnRoamingAuthenticators?: ReactorFeatureStatus;
5727
6045
  }
5728
6046
  /**
5729
6047
  * Response for the user login report.
@@ -5911,6 +6229,17 @@ export interface Requirable extends Enableable {
5911
6229
  */
5912
6230
  export interface RequiresCORSConfiguration {
5913
6231
  }
6232
+ /**
6233
+ * Describes the Relying Party's requirements for <a href="https://www.w3.org/TR/webauthn-2/#client-side-discoverable-credential">client-side
6234
+ * discoverable credentials</a> (formerly known as "resident keys")
6235
+ *
6236
+ * @author Spencer Witt
6237
+ */
6238
+ export declare enum ResidentKeyRequirement {
6239
+ discouraged = "discouraged",
6240
+ preferred = "preferred",
6241
+ required = "required"
6242
+ }
5914
6243
  export declare enum SAMLLogoutBehavior {
5915
6244
  AllParticipants = "AllParticipants",
5916
6245
  OnlyOriginator = "OnlyOriginator"
@@ -5928,6 +6257,7 @@ export interface SAMLv2Configuration extends Enableable {
5928
6257
  callbackURL?: string;
5929
6258
  debug?: boolean;
5930
6259
  defaultVerificationKeyId?: UUID;
6260
+ initiatedLogin?: SAMLv2IdPInitiatedLoginConfiguration;
5931
6261
  issuer?: string;
5932
6262
  keyId?: UUID;
5933
6263
  logout?: SAMLv2Logout;
@@ -5976,6 +6306,14 @@ export interface SAMLv2IdPInitiatedIdentityProvider extends BaseIdentityProvider
5976
6306
  useNameIdForEmail?: boolean;
5977
6307
  usernameClaim?: string;
5978
6308
  }
6309
+ /**
6310
+ * IdP Initiated login configuration
6311
+ *
6312
+ * @author Daniel DeGroff
6313
+ */
6314
+ export interface SAMLv2IdPInitiatedLoginConfiguration extends Enableable {
6315
+ nameIdFormat?: string;
6316
+ }
5979
6317
  export interface SAMLv2Logout {
5980
6318
  behavior?: SAMLLogoutBehavior;
5981
6319
  defaultVerificationKeyId?: UUID;
@@ -6197,6 +6535,9 @@ export interface Templates {
6197
6535
  accountTwoFactorDisable?: string;
6198
6536
  accountTwoFactorEnable?: string;
6199
6537
  accountTwoFactorIndex?: string;
6538
+ accountWebAuthnAdd?: string;
6539
+ accountWebAuthnDelete?: string;
6540
+ accountWebAuthnIndex?: string;
6200
6541
  emailComplete?: string;
6201
6542
  emailSend?: string;
6202
6543
  emailSent?: string;
@@ -6219,6 +6560,9 @@ export interface Templates {
6219
6560
  oauth2TwoFactor?: string;
6220
6561
  oauth2TwoFactorMethods?: string;
6221
6562
  oauth2Wait?: string;
6563
+ oauth2WebAuthn?: string;
6564
+ oauth2WebAuthnReauth?: string;
6565
+ oauth2WebAuthnReauthEnable?: string;
6222
6566
  passwordChange?: string;
6223
6567
  passwordComplete?: string;
6224
6568
  passwordForgot?: string;
@@ -6270,6 +6614,7 @@ export interface Tenant {
6270
6614
  themeId?: UUID;
6271
6615
  userDeletePolicy?: TenantUserDeletePolicy;
6272
6616
  usernameConfiguration?: TenantUsernameConfiguration;
6617
+ webAuthnConfiguration?: TenantWebAuthnConfiguration;
6273
6618
  }
6274
6619
  /**
6275
6620
  * @author Brian Pontarelli
@@ -6401,6 +6746,25 @@ export interface TenantUserDeletePolicy {
6401
6746
  export interface TenantUsernameConfiguration {
6402
6747
  unique?: UniqueUsernameConfiguration;
6403
6748
  }
6749
+ /**
6750
+ * Tenant-level configuration for WebAuthn
6751
+ *
6752
+ * @author Spencer Witt
6753
+ */
6754
+ export interface TenantWebAuthnConfiguration extends Enableable {
6755
+ bootstrapWorkflow?: TenantWebAuthnWorkflowConfiguration;
6756
+ debug?: boolean;
6757
+ reauthenticationWorkflow?: TenantWebAuthnWorkflowConfiguration;
6758
+ relyingPartyId?: string;
6759
+ relyingPartyName?: string;
6760
+ }
6761
+ /**
6762
+ * @author Spencer Witt
6763
+ */
6764
+ export interface TenantWebAuthnWorkflowConfiguration extends Enableable {
6765
+ authenticatorAttachmentPreference?: AuthenticatorAttachmentPreference;
6766
+ userVerificationRequirement?: UserVerificationRequirement;
6767
+ }
6404
6768
  /**
6405
6769
  * @author Daniel DeGroff
6406
6770
  */
@@ -7318,6 +7682,17 @@ export interface UserUpdateEvent extends BaseEvent {
7318
7682
  original?: User;
7319
7683
  user?: User;
7320
7684
  }
7685
+ /**
7686
+ * Used to express whether the Relying Party requires <a href="https://www.w3.org/TR/webauthn-2/#user-verification">user verification</a> for the
7687
+ * current operation.
7688
+ *
7689
+ * @author Spencer Witt
7690
+ */
7691
+ export declare enum UserVerificationRequirement {
7692
+ required = "required",
7693
+ preferred = "preferred",
7694
+ discouraged = "discouraged"
7695
+ }
7321
7696
  /**
7322
7697
  * @author Daniel DeGroff
7323
7698
  */
@@ -7366,6 +7741,200 @@ export interface VerifyRegistrationResponse {
7366
7741
  export interface VersionResponse {
7367
7742
  version?: string;
7368
7743
  }
7744
+ /**
7745
+ * API response for completing WebAuthn assertion
7746
+ *
7747
+ * @author Spencer Witt
7748
+ */
7749
+ export interface WebAuthnAssertResponse {
7750
+ credential?: WebAuthnCredential;
7751
+ }
7752
+ /**
7753
+ * The <i>authenticator's</i> response for the authentication ceremony in its encoded format
7754
+ *
7755
+ * @author Spencer Witt
7756
+ */
7757
+ export interface WebAuthnAuthenticatorAuthenticationResponse {
7758
+ authenticatorData?: string;
7759
+ clientDataJSON?: string;
7760
+ signature?: string;
7761
+ userHandle?: string;
7762
+ }
7763
+ /**
7764
+ * The <i>authenticator's</i> response for the registration ceremony in its encoded format
7765
+ *
7766
+ * @author Spencer Witt
7767
+ */
7768
+ export interface WebAuthnAuthenticatorRegistrationResponse {
7769
+ attestationObject?: string;
7770
+ clientDataJSON?: string;
7771
+ }
7772
+ /**
7773
+ * A User's WebAuthnCredential. Contains all data required to complete WebAuthn authentication ceremonies.
7774
+ *
7775
+ * @author Spencer Witt
7776
+ */
7777
+ export interface WebAuthnCredential {
7778
+ algorithm?: CoseAlgorithmIdentifier;
7779
+ attestationType?: AttestationType;
7780
+ authenticatorSupportsUserVerification?: boolean;
7781
+ credentialId?: string;
7782
+ data?: Record<string, any>;
7783
+ discoverable?: boolean;
7784
+ displayName?: string;
7785
+ id?: UUID;
7786
+ insertInstant?: number;
7787
+ lastUseInstant?: number;
7788
+ name?: string;
7789
+ publicKey?: string;
7790
+ relyingPartyId?: string;
7791
+ signCount?: number;
7792
+ tenantId?: UUID;
7793
+ transports?: Array<string>;
7794
+ userAgent?: string;
7795
+ userId?: UUID;
7796
+ }
7797
+ /**
7798
+ * API request to import an existing WebAuthn credential(s)
7799
+ *
7800
+ * @author Spencer Witt
7801
+ */
7802
+ export interface WebAuthnCredentialImportRequest {
7803
+ credentials?: Array<WebAuthnCredential>;
7804
+ validateDbConstraints?: boolean;
7805
+ }
7806
+ /**
7807
+ * WebAuthn Credential API response
7808
+ *
7809
+ * @author Spencer Witt
7810
+ */
7811
+ export interface WebAuthnCredentialResponse {
7812
+ credential?: WebAuthnCredential;
7813
+ credentials?: Array<WebAuthnCredential>;
7814
+ }
7815
+ /**
7816
+ * Contains extension output for requested extensions during a WebAuthn ceremony
7817
+ *
7818
+ * @author Spencer Witt
7819
+ */
7820
+ export interface WebAuthnExtensionsClientOutputs {
7821
+ credProps?: CredentialPropertiesOutput;
7822
+ }
7823
+ /**
7824
+ * Request to complete the WebAuthn registration ceremony
7825
+ *
7826
+ * @author Spencer Witt
7827
+ */
7828
+ export interface WebAuthnLoginRequest extends BaseLoginRequest {
7829
+ credential?: WebAuthnPublicKeyAuthenticationRequest;
7830
+ origin?: string;
7831
+ rpId?: string;
7832
+ twoFactorTrustId?: string;
7833
+ }
7834
+ /**
7835
+ * Request to authenticate with WebAuthn
7836
+ *
7837
+ * @author Spencer Witt
7838
+ */
7839
+ export interface WebAuthnPublicKeyAuthenticationRequest {
7840
+ clientExtensionResults?: WebAuthnExtensionsClientOutputs;
7841
+ id?: string;
7842
+ response?: WebAuthnAuthenticatorAuthenticationResponse;
7843
+ rpId?: string;
7844
+ type?: string;
7845
+ }
7846
+ /**
7847
+ * Request to register a new public key with WebAuthn
7848
+ *
7849
+ * @author Spencer Witt
7850
+ */
7851
+ export interface WebAuthnPublicKeyRegistrationRequest {
7852
+ clientExtensionResults?: WebAuthnExtensionsClientOutputs;
7853
+ id?: string;
7854
+ response?: WebAuthnAuthenticatorRegistrationResponse;
7855
+ rpId?: string;
7856
+ transports?: Array<string>;
7857
+ type?: string;
7858
+ }
7859
+ /**
7860
+ * Request to complete the WebAuthn registration ceremony for a new credential,.
7861
+ *
7862
+ * @author Spencer Witt
7863
+ */
7864
+ export interface WebAuthnRegisterCompleteRequest {
7865
+ credential?: WebAuthnPublicKeyRegistrationRequest;
7866
+ origin?: string;
7867
+ rpId?: string;
7868
+ userId?: UUID;
7869
+ }
7870
+ /**
7871
+ * API response for completing WebAuthn credential registration or assertion
7872
+ *
7873
+ * @author Spencer Witt
7874
+ */
7875
+ export interface WebAuthnRegisterCompleteResponse {
7876
+ credential?: WebAuthnCredential;
7877
+ }
7878
+ /**
7879
+ * API request to start a WebAuthn registration ceremony
7880
+ *
7881
+ * @author Spencer Witt
7882
+ */
7883
+ export interface WebAuthnRegisterStartRequest {
7884
+ displayName?: string;
7885
+ name?: string;
7886
+ userAgent?: string;
7887
+ userId?: UUID;
7888
+ workflow?: WebAuthnWorkflow;
7889
+ }
7890
+ /**
7891
+ * API response for starting a WebAuthn registration ceremony
7892
+ *
7893
+ * @author Spencer Witt
7894
+ */
7895
+ export interface WebAuthnRegisterStartResponse {
7896
+ options?: PublicKeyCredentialCreationOptions;
7897
+ }
7898
+ /**
7899
+ * Options to request extensions during credential registration
7900
+ *
7901
+ * @author Spencer Witt
7902
+ */
7903
+ export interface WebAuthnRegistrationExtensionOptions {
7904
+ credProps?: boolean;
7905
+ }
7906
+ /**
7907
+ * API request to start a WebAuthn authentication ceremony
7908
+ *
7909
+ * @author Spencer Witt
7910
+ */
7911
+ export interface WebAuthnStartRequest {
7912
+ applicationId?: UUID;
7913
+ credentialId?: UUID;
7914
+ loginId?: string;
7915
+ state?: Record<string, any>;
7916
+ userId?: UUID;
7917
+ workflow?: WebAuthnWorkflow;
7918
+ }
7919
+ /**
7920
+ * API response for starting a WebAuthn authentication ceremony
7921
+ *
7922
+ * @author Spencer Witt
7923
+ */
7924
+ export interface WebAuthnStartResponse {
7925
+ options?: PublicKeyCredentialRequestOptions;
7926
+ }
7927
+ /**
7928
+ * Identifies the WebAuthn workflow. This will affect the parameters used for credential creation
7929
+ * and request based on the Tenant configuration.
7930
+ *
7931
+ * @author Spencer Witt
7932
+ */
7933
+ export declare enum WebAuthnWorkflow {
7934
+ bootstrap = "bootstrap",
7935
+ general = "general",
7936
+ reauthentication = "reauthentication"
7937
+ }
7369
7938
  /**
7370
7939
  * A server where events are sent. This includes user action events and any other events sent by FusionAuth.
7371
7940
  *