@@ -245,10 +245,10 @@ export class FusionAuthClient {
245
245
* Complete a WebAuthn authentication ceremony by validating the signature against the previously generated challenge without logging the user in
246
246
*
247
247
* @param {WebAuthnLoginRequest } request An object containing data necessary for completing the authentication ceremony
248
- * @returns {Promise<ClientResponse<WebAuthnCompleteResponse >> }
248
+ * @returns {Promise<ClientResponse<WebAuthnAssertResponse >> }
249
249
*/
250
- completeWebAuthnAssertion ( request : WebAuthnLoginRequest ) : Promise < ClientResponse < WebAuthnCompleteResponse > > {
251
- return this . startAnonymous < WebAuthnCompleteResponse , Errors > ( )
250
+ completeWebAuthnAssertion ( request : WebAuthnLoginRequest ) : Promise < ClientResponse < WebAuthnAssertResponse > > {
251
+ return this . startAnonymous < WebAuthnAssertResponse , Errors > ( )
252
252
. withUri ( '/api/webauthn/assert' )
253
253
. withJSONBody ( request )
254
254
. withMethod ( "POST" )
@@ -272,11 +272,11 @@ export class FusionAuthClient {
272
272
/**
273
273
* Complete a WebAuthn registration ceremony by validating the client request and saving the new credential
274
274
*
275
- * @param {WebAuthnCompleteRequest } request An object containing data necessary for completing the registration ceremony
276
- * @returns {Promise<ClientResponse<WebAuthnCompleteResponse >> }
275
+ * @param {WebAuthnRegisterCompleteRequest } request An object containing data necessary for completing the registration ceremony
276
+ * @returns {Promise<ClientResponse<WebAuthnRegisterCompleteResponse >> }
277
277
*/
278
- completeWebAuthnRegistration ( request : WebAuthnCompleteRequest ) : Promise < ClientResponse < WebAuthnCompleteResponse > > {
279
- return this . start < WebAuthnCompleteResponse , Errors > ( )
278
+ completeWebAuthnRegistration ( request : WebAuthnRegisterCompleteRequest ) : Promise < ClientResponse < WebAuthnRegisterCompleteResponse > > {
279
+ return this . start < WebAuthnRegisterCompleteResponse , Errors > ( )
280
280
. withUri ( '/api/webauthn/register/complete' )
281
281
. withJSONBody ( request )
282
282
. withMethod ( "POST" )
@@ -1728,10 +1728,10 @@ export class FusionAuthClient {
1728
1728
/**
1729
1729
* Import a WebAuthn credential
1730
1730
*
1731
- * @param {WebAuthnImportRequest } request An object containing data necessary for importing the credential
1731
+ * @param {WebAuthnCredentialImportRequest } request An object containing data necessary for importing the credential
1732
1732
* @returns {Promise<ClientResponse<void>> }
1733
1733
*/
1734
- importWebAuthnCredential ( request : WebAuthnImportRequest ) : Promise < ClientResponse < void > > {
1734
+ importWebAuthnCredential ( request : WebAuthnCredentialImportRequest ) : Promise < ClientResponse < void > > {
1735
1735
return this . start < void , Errors > ( )
1736
1736
. withUri ( '/api/webauthn/import' )
1737
1737
. withJSONBody ( request )
@@ -4382,11 +4382,11 @@ export class FusionAuthClient {
4382
4382
/**
4383
4383
* Start a WebAuthn registration ceremony by generating a new challenge for the user
4384
4384
*
4385
- * @param {WebAuthnRegisterRequest } request An object containing data necessary for starting the registration ceremony
4386
- * @returns {Promise<ClientResponse<WebAuthnRegisterResponse >> }
4385
+ * @param {WebAuthnRegisterStartRequest } request An object containing data necessary for starting the registration ceremony
4386
+ * @returns {Promise<ClientResponse<WebAuthnRegisterStartResponse >> }
4387
4387
*/
4388
- startWebAuthnRegistration ( request : WebAuthnRegisterRequest ) : Promise < ClientResponse < WebAuthnRegisterResponse > > {
4389
- return this . start < WebAuthnRegisterResponse , Errors > ( )
4388
+ startWebAuthnRegistration ( request : WebAuthnRegisterStartRequest ) : Promise < ClientResponse < WebAuthnRegisterStartResponse > > {
4389
+ return this . start < WebAuthnRegisterStartResponse , Errors > ( )
4390
4390
. withUri ( '/api/webauthn/register/start' )
4391
4391
. withJSONBody ( request )
4392
4392
. withMethod ( "POST" )
@@ -5526,18 +5526,6 @@ export enum AuthenticatorAttachmentPreference {
5526
5526
crossPlatform = "crossPlatform"
5527
5527
}
5528
5528
5529
- /**
5530
- * The <i>authenticator's</i> response for the authentication ceremony in its encoded format
5531
- *
5532
- * @author Spencer Witt
5533
- */
5534
- export interface AuthenticatorAuthenticationResponse {
5535
- authenticatorData ?: string ;
5536
- clientDataJSON ?: string ;
5537
- signature ?: string ;
5538
- userHandle ?: string ;
5539
- }
5540
-
5541
5529
/**
5542
5530
* @author Daniel DeGroff
5543
5531
*/
@@ -5547,16 +5535,6 @@ export interface AuthenticatorConfiguration {
5547
5535
timeStep ?: number ;
5548
5536
}
5549
5537
5550
- /**
5551
- * The <i>authenticator's</i> response for the registration ceremony in its encoded format
5552
- *
5553
- * @author Spencer Witt
5554
- */
5555
- export interface AuthenticatorRegistrationResponse {
5556
- attestationObject ?: string ;
5557
- clientDataJSON ?: string ;
5558
- }
5559
-
5560
5538
/**
5561
5539
* Used by the Relying Party to specify their requirements for authenticator attributes. Fields use the deprecated "resident key" terminology to refer
5562
5540
* to client-side discoverable credentials to maintain backwards compatibility with WebAuthn Level 1.
@@ -8694,19 +8672,6 @@ export enum ProofKeyForCodeExchangePolicy {
8694
8672
NotRequiredWhenUsingClientAuthentication = "NotRequiredWhenUsingClientAuthentication"
8695
8673
}
8696
8674
8697
- /**
8698
- * Request to authenticate with WebAuthn
8699
- *
8700
- * @author Spencer Witt
8701
- */
8702
- export interface PublicKeyAuthenticationRequest {
8703
- clientExtensionResults ?: WebAuthnExtensionsClientOutputs ;
8704
- id ?: string ;
8705
- response ?: AuthenticatorAuthenticationResponse ;
8706
- rpId ?: string ;
8707
- type ?: string ;
8708
- }
8709
-
8710
8675
/**
8711
8676
* Allows the Relying Party to specify desired attributes of a new credential.
8712
8677
*
@@ -8793,20 +8758,6 @@ export interface PublicKeyCredentialUserEntity extends PublicKeyCredentialEntity
8793
8758
id ?: string ;
8794
8759
}
8795
8760
8796
- /**
8797
- * Request to register a new public key with WebAuthn
8798
- *
8799
- * @author Spencer Witt
8800
- */
8801
- export interface PublicKeyRegistrationRequest {
8802
- clientExtensionResults ?: WebAuthnExtensionsClientOutputs ;
8803
- id ?: string ;
8804
- response ?: AuthenticatorRegistrationResponse ;
8805
- rpId ?: string ;
8806
- transports ?: Array < string > ;
8807
- type ?: string ;
8808
- }
8809
-
8810
8761
/**
8811
8762
* JWT Public Key Response Object
8812
8763
*
@@ -10789,24 +10740,34 @@ export interface VersionResponse {
10789
10740
}
10790
10741
10791
10742
/**
10792
- * Request to complete the WebAuthn registration ceremony for a new credential
10743
+ * API response for completing WebAuthn assertion
10793
10744
*
10794
10745
* @author Spencer Witt
10795
10746
*/
10796
- export interface WebAuthnCompleteRequest {
10797
- credential ?: PublicKeyRegistrationRequest ;
10798
- origin ?: string ;
10799
- rpId ?: string ;
10800
- userId ?: UUID ;
10747
+ export interface WebAuthnAssertResponse {
10748
+ credential ?: WebAuthnCredential ;
10801
10749
}
10802
10750
10803
10751
/**
10804
- * API response for completing WebAuthn credential registration or assertion
10752
+ * The <i>authenticator's</i> response for the authentication ceremony in its encoded format
10805
10753
*
10806
10754
* @author Spencer Witt
10807
10755
*/
10808
- export interface WebAuthnCompleteResponse {
10809
- credential ?: WebAuthnCredential ;
10756
+ export interface WebAuthnAuthenticatorAuthenticationResponse {
10757
+ authenticatorData ?: string ;
10758
+ clientDataJSON ?: string ;
10759
+ signature ?: string ;
10760
+ userHandle ?: string ;
10761
+ }
10762
+
10763
+ /**
10764
+ * The <i>authenticator's</i> response for the registration ceremony in its encoded format
10765
+ *
10766
+ * @author Spencer Witt
10767
+ */
10768
+ export interface WebAuthnAuthenticatorRegistrationResponse {
10769
+ attestationObject ?: string ;
10770
+ clientDataJSON ?: string ;
10810
10771
}
10811
10772
10812
10773
/**
@@ -10835,6 +10796,16 @@ export interface WebAuthnCredential {
10835
10796
userId ?: UUID ;
10836
10797
}
10837
10798
10799
+ /**
10800
+ * API request to import an existing WebAuthn credential(s)
10801
+ *
10802
+ * @author Spencer Witt
10803
+ */
10804
+ export interface WebAuthnCredentialImportRequest {
10805
+ credentials ?: Array < WebAuthnCredential > ;
10806
+ validateDbConstraints ?: boolean ;
10807
+ }
10808
+
10838
10809
/**
10839
10810
* WebAuthn Credential API response
10840
10811
*
@@ -10855,33 +10826,71 @@ export interface WebAuthnExtensionsClientOutputs {
10855
10826
}
10856
10827
10857
10828
/**
10858
- * API request to import an existing WebAuthn credential(s)
10829
+ * Request to complete the WebAuthn registration ceremony
10859
10830
*
10860
10831
* @author Spencer Witt
10861
10832
*/
10862
- export interface WebAuthnImportRequest {
10863
- credentials ?: Array < WebAuthnCredential > ;
10864
- validateDbConstraints ?: boolean ;
10833
+ export interface WebAuthnLoginRequest extends BaseLoginRequest {
10834
+ credential ?: WebAuthnPublicKeyAuthenticationRequest ;
10835
+ origin ?: string ;
10836
+ rpId ?: string ;
10837
+ twoFactorTrustId ?: string ;
10865
10838
}
10866
10839
10867
10840
/**
10868
- * Request to complete the WebAuthn registration ceremony
10841
+ * Request to authenticate with WebAuthn
10869
10842
*
10870
10843
* @author Spencer Witt
10871
10844
*/
10872
- export interface WebAuthnLoginRequest extends BaseLoginRequest {
10873
- credential ?: PublicKeyAuthenticationRequest ;
10845
+ export interface WebAuthnPublicKeyAuthenticationRequest {
10846
+ clientExtensionResults ?: WebAuthnExtensionsClientOutputs ;
10847
+ id ?: string ;
10848
+ response ?: WebAuthnAuthenticatorAuthenticationResponse ;
10849
+ rpId ?: string ;
10850
+ type ?: string ;
10851
+ }
10852
+
10853
+ /**
10854
+ * Request to register a new public key with WebAuthn
10855
+ *
10856
+ * @author Spencer Witt
10857
+ */
10858
+ export interface WebAuthnPublicKeyRegistrationRequest {
10859
+ clientExtensionResults ?: WebAuthnExtensionsClientOutputs ;
10860
+ id ?: string ;
10861
+ response ?: WebAuthnAuthenticatorRegistrationResponse ;
10862
+ rpId ?: string ;
10863
+ transports ?: Array < string > ;
10864
+ type ?: string ;
10865
+ }
10866
+
10867
+ /**
10868
+ * Request to complete the WebAuthn registration ceremony for a new credential,.
10869
+ *
10870
+ * @author Spencer Witt
10871
+ */
10872
+ export interface WebAuthnRegisterCompleteRequest {
10873
+ credential ?: WebAuthnPublicKeyRegistrationRequest ;
10874
10874
origin ?: string ;
10875
10875
rpId ?: string ;
10876
- twoFactorTrustId ?: string ;
10876
+ userId ?: UUID ;
10877
+ }
10878
+
10879
+ /**
10880
+ * API response for completing WebAuthn credential registration or assertion
10881
+ *
10882
+ * @author Spencer Witt
10883
+ */
10884
+ export interface WebAuthnRegisterCompleteResponse {
10885
+ credential ?: WebAuthnCredential ;
10877
10886
}
10878
10887
10879
10888
/**
10880
10889
* API request to start a WebAuthn registration ceremony
10881
10890
*
10882
10891
* @author Spencer Witt
10883
10892
*/
10884
- export interface WebAuthnRegisterRequest {
10893
+ export interface WebAuthnRegisterStartRequest {
10885
10894
displayName ?: string ;
10886
10895
name ?: string ;
10887
10896
userAgent ?: string ;
@@ -10894,7 +10903,7 @@ export interface WebAuthnRegisterRequest {
10894
10903
*
10895
10904
* @author Spencer Witt
10896
10905
*/
10897
- export interface WebAuthnRegisterResponse {
10906
+ export interface WebAuthnRegisterStartResponse {
10898
10907
options ?: PublicKeyCredentialCreationOptions ;
10899
10908
}
10900
10909
0 commit comments