@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.
- package/build/src/FusionAuthClient.d.ts +566 -14
- package/build/src/FusionAuthClient.js +289 -12
- package/build/src/FusionAuthClient.js.map +1 -1
- package/dist/fusionauth-typescript-client.js +290 -13
- package/dist/fusionauth-typescript-client.min.js +1 -1
- package/dist/fusionauth-typescript-client.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -187,6 +187,26 @@ class FusionAuthClient {
|
|
|
187
187
|
.withMethod("GET")
|
|
188
188
|
.go();
|
|
189
189
|
}
|
|
190
|
+
/**
|
|
191
|
+
* Make a Client Credentials grant request to obtain an access token.
|
|
192
|
+
*
|
|
193
|
+
* @param {string} client_id The client identifier. The client Id is the Id of the FusionAuth Entity in which you are attempting to authenticate.
|
|
194
|
+
* @param {string} client_secret The client secret used to authenticate this request.
|
|
195
|
+
* @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:<target-entity-id>:<roles>. Roles are an optional comma separated list.
|
|
196
|
+
* @returns {Promise<ClientResponse<AccessToken>>}
|
|
197
|
+
*/
|
|
198
|
+
clientCredentialsGrant(client_id, client_secret, scope) {
|
|
199
|
+
let body = new url_1.URLSearchParams();
|
|
200
|
+
body.append('client_id', client_id);
|
|
201
|
+
body.append('client_secret', client_secret);
|
|
202
|
+
body.append('grant_type', 'client_credentials');
|
|
203
|
+
body.append('scope', scope);
|
|
204
|
+
return this.startAnonymous()
|
|
205
|
+
.withUri('/oauth2/token')
|
|
206
|
+
.withFormData(body)
|
|
207
|
+
.withMethod("POST")
|
|
208
|
+
.go();
|
|
209
|
+
}
|
|
190
210
|
/**
|
|
191
211
|
* Adds a comment to the user's account.
|
|
192
212
|
*
|
|
@@ -200,6 +220,45 @@ class FusionAuthClient {
|
|
|
200
220
|
.withMethod("POST")
|
|
201
221
|
.go();
|
|
202
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* Complete a WebAuthn authentication ceremony by validating the signature against the previously generated challenge without logging the user in
|
|
225
|
+
*
|
|
226
|
+
* @param {WebAuthnLoginRequest} request An object containing data necessary for completing the authentication ceremony
|
|
227
|
+
* @returns {Promise<ClientResponse<WebAuthnAssertResponse>>}
|
|
228
|
+
*/
|
|
229
|
+
completeWebAuthnAssertion(request) {
|
|
230
|
+
return this.startAnonymous()
|
|
231
|
+
.withUri('/api/webauthn/assert')
|
|
232
|
+
.withJSONBody(request)
|
|
233
|
+
.withMethod("POST")
|
|
234
|
+
.go();
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Complete a WebAuthn authentication ceremony by validating the signature against the previously generated challenge and then login the user in
|
|
238
|
+
*
|
|
239
|
+
* @param {WebAuthnLoginRequest} request An object containing data necessary for completing the authentication ceremony
|
|
240
|
+
* @returns {Promise<ClientResponse<LoginResponse>>}
|
|
241
|
+
*/
|
|
242
|
+
completeWebAuthnLogin(request) {
|
|
243
|
+
return this.startAnonymous()
|
|
244
|
+
.withUri('/api/webauthn/login')
|
|
245
|
+
.withJSONBody(request)
|
|
246
|
+
.withMethod("POST")
|
|
247
|
+
.go();
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Complete a WebAuthn registration ceremony by validating the client request and saving the new credential
|
|
251
|
+
*
|
|
252
|
+
* @param {WebAuthnRegisterCompleteRequest} request An object containing data necessary for completing the registration ceremony
|
|
253
|
+
* @returns {Promise<ClientResponse<WebAuthnRegisterCompleteResponse>>}
|
|
254
|
+
*/
|
|
255
|
+
completeWebAuthnRegistration(request) {
|
|
256
|
+
return this.start()
|
|
257
|
+
.withUri('/api/webauthn/register/complete')
|
|
258
|
+
.withJSONBody(request)
|
|
259
|
+
.withMethod("POST")
|
|
260
|
+
.go();
|
|
261
|
+
}
|
|
203
262
|
/**
|
|
204
263
|
* Creates an API key. You can optionally specify a unique Id for the key, if not provided one will be generated.
|
|
205
264
|
* an API key can only be created with equal or lesser authority. An API key cannot create another API key unless it is granted
|
|
@@ -1192,6 +1251,19 @@ class FusionAuthClient {
|
|
|
1192
1251
|
.withMethod("DELETE")
|
|
1193
1252
|
.go();
|
|
1194
1253
|
}
|
|
1254
|
+
/**
|
|
1255
|
+
* Deletes the WebAuthn credential for the given Id.
|
|
1256
|
+
*
|
|
1257
|
+
* @param {UUID} id The Id of the WebAuthn credential to delete.
|
|
1258
|
+
* @returns {Promise<ClientResponse<void>>}
|
|
1259
|
+
*/
|
|
1260
|
+
deleteWebAuthnCredential(id) {
|
|
1261
|
+
return this.start()
|
|
1262
|
+
.withUri('/api/webauthn')
|
|
1263
|
+
.withUriSegment(id)
|
|
1264
|
+
.withMethod("DELETE")
|
|
1265
|
+
.go();
|
|
1266
|
+
}
|
|
1195
1267
|
/**
|
|
1196
1268
|
* Deletes the webhook for the given Id.
|
|
1197
1269
|
*
|
|
@@ -1206,11 +1278,11 @@ class FusionAuthClient {
|
|
|
1206
1278
|
.go();
|
|
1207
1279
|
}
|
|
1208
1280
|
/**
|
|
1209
|
-
* Disable
|
|
1281
|
+
* Disable two-factor authentication for a user.
|
|
1210
1282
|
*
|
|
1211
|
-
* @param {UUID} userId The Id of the User for which you're disabling
|
|
1283
|
+
* @param {UUID} userId The Id of the User for which you're disabling two-factor authentication.
|
|
1212
1284
|
* @param {string} methodId The two-factor method identifier you wish to disable
|
|
1213
|
-
* @param {string} code The
|
|
1285
|
+
* @param {string} code The two-factor code used verify the the caller knows the two-factor secret.
|
|
1214
1286
|
* @returns {Promise<ClientResponse<void>>}
|
|
1215
1287
|
*/
|
|
1216
1288
|
disableTwoFactor(userId, methodId, code) {
|
|
@@ -1223,9 +1295,9 @@ class FusionAuthClient {
|
|
|
1223
1295
|
.go();
|
|
1224
1296
|
}
|
|
1225
1297
|
/**
|
|
1226
|
-
* Disable
|
|
1298
|
+
* Disable two-factor authentication for a user using a JSON body rather than URL parameters.
|
|
1227
1299
|
*
|
|
1228
|
-
* @param {UUID} userId The Id of the User for which you're disabling
|
|
1300
|
+
* @param {UUID} userId The Id of the User for which you're disabling two-factor authentication.
|
|
1229
1301
|
* @param {TwoFactorDisableRequest} request The request information that contains the code and methodId along with any event information.
|
|
1230
1302
|
* @returns {Promise<ClientResponse<void>>}
|
|
1231
1303
|
*/
|
|
@@ -1238,10 +1310,10 @@ class FusionAuthClient {
|
|
|
1238
1310
|
.go();
|
|
1239
1311
|
}
|
|
1240
1312
|
/**
|
|
1241
|
-
* Enable
|
|
1313
|
+
* Enable two-factor authentication for a user.
|
|
1242
1314
|
*
|
|
1243
|
-
* @param {UUID} userId The Id of the user to enable
|
|
1244
|
-
* @param {TwoFactorRequest} request The two
|
|
1315
|
+
* @param {UUID} userId The Id of the user to enable two-factor authentication.
|
|
1316
|
+
* @param {TwoFactorRequest} request The two-factor enable request information.
|
|
1245
1317
|
* @returns {Promise<ClientResponse<TwoFactorResponse>>}
|
|
1246
1318
|
*/
|
|
1247
1319
|
enableTwoFactor(userId, request) {
|
|
@@ -1257,7 +1329,7 @@ class FusionAuthClient {
|
|
|
1257
1329
|
* Makes a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint for an access token.
|
|
1258
1330
|
*
|
|
1259
1331
|
* @param {string} code The authorization code returned on the /oauth2/authorize response.
|
|
1260
|
-
* @param {string} client_id The unique client identifier. The client Id is the Id of the FusionAuth Application in which you
|
|
1332
|
+
* @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.
|
|
1261
1333
|
* @param {string} client_secret (Optional) The client secret. This value will be required if client authentication is enabled.
|
|
1262
1334
|
* @param {string} redirect_uri The URI to redirect to upon a successful request.
|
|
1263
1335
|
* @returns {Promise<ClientResponse<AccessToken>>}
|
|
@@ -1280,7 +1352,7 @@ class FusionAuthClient {
|
|
|
1280
1352
|
* 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.
|
|
1281
1353
|
*
|
|
1282
1354
|
* @param {string} code The authorization code returned on the /oauth2/authorize response.
|
|
1283
|
-
* @param {string} client_id (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you
|
|
1355
|
+
* @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.
|
|
1284
1356
|
* @param {string} client_secret (Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header.
|
|
1285
1357
|
* @param {string} redirect_uri The URI to redirect to upon a successful request.
|
|
1286
1358
|
* @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.
|
|
@@ -1305,7 +1377,7 @@ class FusionAuthClient {
|
|
|
1305
1377
|
* 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.
|
|
1306
1378
|
*
|
|
1307
1379
|
* @param {string} refresh_token The refresh token that you would like to use to exchange for an access token.
|
|
1308
|
-
* @param {string} client_id (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you
|
|
1380
|
+
* @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.
|
|
1309
1381
|
* @param {string} client_secret (Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header.
|
|
1310
1382
|
* @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.
|
|
1311
1383
|
* @param {string} user_code (Optional) The end-user verification code. This code is required if using this endpoint to approve the Device Authorization.
|
|
@@ -1344,7 +1416,7 @@ class FusionAuthClient {
|
|
|
1344
1416
|
*
|
|
1345
1417
|
* @param {string} username The login identifier of the user. The login identifier can be either the email or the username.
|
|
1346
1418
|
* @param {string} password The user’s password.
|
|
1347
|
-
* @param {string} client_id (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you
|
|
1419
|
+
* @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.
|
|
1348
1420
|
* @param {string} client_secret (Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header.
|
|
1349
1421
|
* @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.
|
|
1350
1422
|
* @param {string} user_code (Optional) The end-user verification code. This code is required if using this endpoint to approve the Device Authorization.
|
|
@@ -1537,6 +1609,19 @@ class FusionAuthClient {
|
|
|
1537
1609
|
.withMethod("POST")
|
|
1538
1610
|
.go();
|
|
1539
1611
|
}
|
|
1612
|
+
/**
|
|
1613
|
+
* Import a WebAuthn credential
|
|
1614
|
+
*
|
|
1615
|
+
* @param {WebAuthnCredentialImportRequest} request An object containing data necessary for importing the credential
|
|
1616
|
+
* @returns {Promise<ClientResponse<void>>}
|
|
1617
|
+
*/
|
|
1618
|
+
importWebAuthnCredential(request) {
|
|
1619
|
+
return this.start()
|
|
1620
|
+
.withUri('/api/webauthn/import')
|
|
1621
|
+
.withJSONBody(request)
|
|
1622
|
+
.withMethod("POST")
|
|
1623
|
+
.go();
|
|
1624
|
+
}
|
|
1540
1625
|
/**
|
|
1541
1626
|
* Inspect an access token issued by FusionAuth.
|
|
1542
1627
|
*
|
|
@@ -3468,6 +3553,32 @@ class FusionAuthClient {
|
|
|
3468
3553
|
.withMethod("GET")
|
|
3469
3554
|
.go();
|
|
3470
3555
|
}
|
|
3556
|
+
/**
|
|
3557
|
+
* Retrieves the WebAuthn credential for the given Id.
|
|
3558
|
+
*
|
|
3559
|
+
* @param {UUID} id The Id of the WebAuthn credential.
|
|
3560
|
+
* @returns {Promise<ClientResponse<WebAuthnCredentialResponse>>}
|
|
3561
|
+
*/
|
|
3562
|
+
retrieveWebAuthnCredential(id) {
|
|
3563
|
+
return this.start()
|
|
3564
|
+
.withUri('/api/webauthn')
|
|
3565
|
+
.withUriSegment(id)
|
|
3566
|
+
.withMethod("GET")
|
|
3567
|
+
.go();
|
|
3568
|
+
}
|
|
3569
|
+
/**
|
|
3570
|
+
* Retrieves all WebAuthn credentials for the given user.
|
|
3571
|
+
*
|
|
3572
|
+
* @param {UUID} userId The user's ID.
|
|
3573
|
+
* @returns {Promise<ClientResponse<WebAuthnCredentialResponse>>}
|
|
3574
|
+
*/
|
|
3575
|
+
retrieveWebAuthnCredentialsForUser(userId) {
|
|
3576
|
+
return this.start()
|
|
3577
|
+
.withUri('/api/webauthn')
|
|
3578
|
+
.withParameter('userId', userId)
|
|
3579
|
+
.withMethod("GET")
|
|
3580
|
+
.go();
|
|
3581
|
+
}
|
|
3471
3582
|
/**
|
|
3472
3583
|
* Retrieves the webhook for the given Id. If you pass in null for the id, this will return all the webhooks.
|
|
3473
3584
|
*
|
|
@@ -3961,6 +4072,32 @@ class FusionAuthClient {
|
|
|
3961
4072
|
.withMethod("POST")
|
|
3962
4073
|
.go();
|
|
3963
4074
|
}
|
|
4075
|
+
/**
|
|
4076
|
+
* Start a WebAuthn authentication ceremony by generating a new challenge for the user
|
|
4077
|
+
*
|
|
4078
|
+
* @param {WebAuthnStartRequest} request An object containing data necessary for starting the authentication ceremony
|
|
4079
|
+
* @returns {Promise<ClientResponse<WebAuthnStartResponse>>}
|
|
4080
|
+
*/
|
|
4081
|
+
startWebAuthnLogin(request) {
|
|
4082
|
+
return this.start()
|
|
4083
|
+
.withUri('/api/webauthn/start')
|
|
4084
|
+
.withJSONBody(request)
|
|
4085
|
+
.withMethod("POST")
|
|
4086
|
+
.go();
|
|
4087
|
+
}
|
|
4088
|
+
/**
|
|
4089
|
+
* Start a WebAuthn registration ceremony by generating a new challenge for the user
|
|
4090
|
+
*
|
|
4091
|
+
* @param {WebAuthnRegisterStartRequest} request An object containing data necessary for starting the registration ceremony
|
|
4092
|
+
* @returns {Promise<ClientResponse<WebAuthnRegisterStartResponse>>}
|
|
4093
|
+
*/
|
|
4094
|
+
startWebAuthnRegistration(request) {
|
|
4095
|
+
return this.start()
|
|
4096
|
+
.withUri('/api/webauthn/register/start')
|
|
4097
|
+
.withJSONBody(request)
|
|
4098
|
+
.withMethod("POST")
|
|
4099
|
+
.go();
|
|
4100
|
+
}
|
|
3964
4101
|
/**
|
|
3965
4102
|
* Complete login using a 2FA challenge
|
|
3966
4103
|
*
|
|
@@ -4617,6 +4754,31 @@ var ApplicationMultiFactorTrustPolicy;
|
|
|
4617
4754
|
ApplicationMultiFactorTrustPolicy["This"] = "This";
|
|
4618
4755
|
ApplicationMultiFactorTrustPolicy["None"] = "None";
|
|
4619
4756
|
})(ApplicationMultiFactorTrustPolicy = exports.ApplicationMultiFactorTrustPolicy || (exports.ApplicationMultiFactorTrustPolicy = {}));
|
|
4757
|
+
/**
|
|
4758
|
+
* Used to communicate whether and how authenticator attestation should be delivered to the Relying Party
|
|
4759
|
+
*
|
|
4760
|
+
* @author Spencer Witt
|
|
4761
|
+
*/
|
|
4762
|
+
var AttestationConveyancePreference;
|
|
4763
|
+
(function (AttestationConveyancePreference) {
|
|
4764
|
+
AttestationConveyancePreference["none"] = "none";
|
|
4765
|
+
AttestationConveyancePreference["indirect"] = "indirect";
|
|
4766
|
+
AttestationConveyancePreference["direct"] = "direct";
|
|
4767
|
+
AttestationConveyancePreference["enterprise"] = "enterprise";
|
|
4768
|
+
})(AttestationConveyancePreference = exports.AttestationConveyancePreference || (exports.AttestationConveyancePreference = {}));
|
|
4769
|
+
/**
|
|
4770
|
+
* Used to indicate what type of attestation was included in the authenticator response for a given WebAuthn credential at the time it was created
|
|
4771
|
+
*
|
|
4772
|
+
* @author Spencer Witt
|
|
4773
|
+
*/
|
|
4774
|
+
var AttestationType;
|
|
4775
|
+
(function (AttestationType) {
|
|
4776
|
+
AttestationType["basic"] = "basic";
|
|
4777
|
+
AttestationType["self"] = "self";
|
|
4778
|
+
AttestationType["attestationCa"] = "attestationCa";
|
|
4779
|
+
AttestationType["anonymizationCa"] = "anonymizationCa";
|
|
4780
|
+
AttestationType["none"] = "none";
|
|
4781
|
+
})(AttestationType = exports.AttestationType || (exports.AttestationType = {}));
|
|
4620
4782
|
/**
|
|
4621
4783
|
* @author Brett Pontarelli
|
|
4622
4784
|
*/
|
|
@@ -4624,6 +4786,27 @@ var AuthenticationThreats;
|
|
|
4624
4786
|
(function (AuthenticationThreats) {
|
|
4625
4787
|
AuthenticationThreats["ImpossibleTravel"] = "ImpossibleTravel";
|
|
4626
4788
|
})(AuthenticationThreats = exports.AuthenticationThreats || (exports.AuthenticationThreats = {}));
|
|
4789
|
+
/**
|
|
4790
|
+
* Describes the <a href="https://www.w3.org/TR/webauthn-2/#authenticator-attachment-modality">authenticator attachment modality</a>.
|
|
4791
|
+
*
|
|
4792
|
+
* @author Spencer Witt
|
|
4793
|
+
*/
|
|
4794
|
+
var AuthenticatorAttachment;
|
|
4795
|
+
(function (AuthenticatorAttachment) {
|
|
4796
|
+
AuthenticatorAttachment["platform"] = "platform";
|
|
4797
|
+
AuthenticatorAttachment["crossPlatform"] = "crossPlatform";
|
|
4798
|
+
})(AuthenticatorAttachment = exports.AuthenticatorAttachment || (exports.AuthenticatorAttachment = {}));
|
|
4799
|
+
/**
|
|
4800
|
+
* Describes the authenticator attachment modality preference for a WebAuthn workflow. See {@link AuthenticatorAttachment}
|
|
4801
|
+
*
|
|
4802
|
+
* @author Spencer Witt
|
|
4803
|
+
*/
|
|
4804
|
+
var AuthenticatorAttachmentPreference;
|
|
4805
|
+
(function (AuthenticatorAttachmentPreference) {
|
|
4806
|
+
AuthenticatorAttachmentPreference["any"] = "any";
|
|
4807
|
+
AuthenticatorAttachmentPreference["platform"] = "platform";
|
|
4808
|
+
AuthenticatorAttachmentPreference["crossPlatform"] = "crossPlatform";
|
|
4809
|
+
})(AuthenticatorAttachmentPreference = exports.AuthenticatorAttachmentPreference || (exports.AuthenticatorAttachmentPreference = {}));
|
|
4627
4810
|
var BreachAction;
|
|
4628
4811
|
(function (BreachAction) {
|
|
4629
4812
|
BreachAction["Off"] = "Off";
|
|
@@ -4727,6 +4910,54 @@ var ContentStatus;
|
|
|
4727
4910
|
ContentStatus["PENDING"] = "PENDING";
|
|
4728
4911
|
ContentStatus["REJECTED"] = "REJECTED";
|
|
4729
4912
|
})(ContentStatus = exports.ContentStatus || (exports.ContentStatus = {}));
|
|
4913
|
+
/**
|
|
4914
|
+
* A number identifying a cryptographic algorithm. Values should be registered with the <a
|
|
4915
|
+
* href="https://www.iana.org/assignments/cose/cose.xhtml#algorithms">IANA COSE Algorithms registry</a>
|
|
4916
|
+
*
|
|
4917
|
+
* @author Spencer Witt
|
|
4918
|
+
*/
|
|
4919
|
+
var CoseAlgorithmIdentifier;
|
|
4920
|
+
(function (CoseAlgorithmIdentifier) {
|
|
4921
|
+
CoseAlgorithmIdentifier["ES256"] = "SHA256withECDSA";
|
|
4922
|
+
CoseAlgorithmIdentifier["ES384"] = "SHA384withECDSA";
|
|
4923
|
+
CoseAlgorithmIdentifier["ES512"] = "SHA512withECDSA";
|
|
4924
|
+
CoseAlgorithmIdentifier["RS256"] = "SHA256withRSA";
|
|
4925
|
+
CoseAlgorithmIdentifier["RS384"] = "SHA384withRSA";
|
|
4926
|
+
CoseAlgorithmIdentifier["RS512"] = "SHA512withRSA";
|
|
4927
|
+
CoseAlgorithmIdentifier["PS256"] = "SHA-256";
|
|
4928
|
+
CoseAlgorithmIdentifier["PS384"] = "SHA-384";
|
|
4929
|
+
CoseAlgorithmIdentifier["PS512"] = "SHA-512";
|
|
4930
|
+
})(CoseAlgorithmIdentifier = exports.CoseAlgorithmIdentifier || (exports.CoseAlgorithmIdentifier = {}));
|
|
4931
|
+
/**
|
|
4932
|
+
* COSE Elliptic Curve identifier to determine which elliptic curve to use with a given key
|
|
4933
|
+
*
|
|
4934
|
+
* @author Spencer Witt
|
|
4935
|
+
*/
|
|
4936
|
+
var CoseEllipticCurve;
|
|
4937
|
+
(function (CoseEllipticCurve) {
|
|
4938
|
+
CoseEllipticCurve["Reserved"] = "Reserved";
|
|
4939
|
+
CoseEllipticCurve["P256"] = "P256";
|
|
4940
|
+
CoseEllipticCurve["P384"] = "P384";
|
|
4941
|
+
CoseEllipticCurve["P521"] = "P521";
|
|
4942
|
+
CoseEllipticCurve["X25519"] = "X25519";
|
|
4943
|
+
CoseEllipticCurve["X448"] = "X448";
|
|
4944
|
+
CoseEllipticCurve["Ed25519"] = "Ed25519";
|
|
4945
|
+
CoseEllipticCurve["Ed448"] = "Ed448";
|
|
4946
|
+
CoseEllipticCurve["Secp256k1"] = "Secp256k1";
|
|
4947
|
+
})(CoseEllipticCurve = exports.CoseEllipticCurve || (exports.CoseEllipticCurve = {}));
|
|
4948
|
+
/**
|
|
4949
|
+
* COSE key type
|
|
4950
|
+
*
|
|
4951
|
+
* @author Spencer Witt
|
|
4952
|
+
*/
|
|
4953
|
+
var CoseKeyType;
|
|
4954
|
+
(function (CoseKeyType) {
|
|
4955
|
+
CoseKeyType["Reserved"] = "0";
|
|
4956
|
+
CoseKeyType["OKP"] = "1";
|
|
4957
|
+
CoseKeyType["EC2"] = "2";
|
|
4958
|
+
CoseKeyType["RSA"] = "3";
|
|
4959
|
+
CoseKeyType["Symmetric"] = "4";
|
|
4960
|
+
})(CoseKeyType = exports.CoseKeyType || (exports.CoseKeyType = {}));
|
|
4730
4961
|
var DeviceType;
|
|
4731
4962
|
(function (DeviceType) {
|
|
4732
4963
|
DeviceType["BROWSER"] = "BROWSER";
|
|
@@ -5074,6 +5305,7 @@ var MultiFactorLoginPolicy;
|
|
|
5074
5305
|
(function (MultiFactorLoginPolicy) {
|
|
5075
5306
|
MultiFactorLoginPolicy["Disabled"] = "Disabled";
|
|
5076
5307
|
MultiFactorLoginPolicy["Enabled"] = "Enabled";
|
|
5308
|
+
MultiFactorLoginPolicy["Required"] = "Required";
|
|
5077
5309
|
})(MultiFactorLoginPolicy = exports.MultiFactorLoginPolicy || (exports.MultiFactorLoginPolicy = {}));
|
|
5078
5310
|
var OAuthErrorReason;
|
|
5079
5311
|
(function (OAuthErrorReason) {
|
|
@@ -5168,6 +5400,15 @@ var ProofKeyForCodeExchangePolicy;
|
|
|
5168
5400
|
ProofKeyForCodeExchangePolicy["NotRequired"] = "NotRequired";
|
|
5169
5401
|
ProofKeyForCodeExchangePolicy["NotRequiredWhenUsingClientAuthentication"] = "NotRequiredWhenUsingClientAuthentication";
|
|
5170
5402
|
})(ProofKeyForCodeExchangePolicy = exports.ProofKeyForCodeExchangePolicy || (exports.ProofKeyForCodeExchangePolicy = {}));
|
|
5403
|
+
/**
|
|
5404
|
+
* Defines valid credential types. This is an extension point in the WebAuthn spec. The only defined value at this time is "public-key"
|
|
5405
|
+
*
|
|
5406
|
+
* @author Spencer Witt
|
|
5407
|
+
*/
|
|
5408
|
+
var PublicKeyCredentialType;
|
|
5409
|
+
(function (PublicKeyCredentialType) {
|
|
5410
|
+
PublicKeyCredentialType["publicKey"] = "public-key";
|
|
5411
|
+
})(PublicKeyCredentialType = exports.PublicKeyCredentialType || (exports.PublicKeyCredentialType = {}));
|
|
5171
5412
|
/**
|
|
5172
5413
|
* @author Daniel DeGroff
|
|
5173
5414
|
*/
|
|
@@ -5212,6 +5453,18 @@ var RegistrationType;
|
|
|
5212
5453
|
RegistrationType["basic"] = "basic";
|
|
5213
5454
|
RegistrationType["advanced"] = "advanced";
|
|
5214
5455
|
})(RegistrationType = exports.RegistrationType || (exports.RegistrationType = {}));
|
|
5456
|
+
/**
|
|
5457
|
+
* Describes the Relying Party's requirements for <a href="https://www.w3.org/TR/webauthn-2/#client-side-discoverable-credential">client-side
|
|
5458
|
+
* discoverable credentials</a> (formerly known as "resident keys")
|
|
5459
|
+
*
|
|
5460
|
+
* @author Spencer Witt
|
|
5461
|
+
*/
|
|
5462
|
+
var ResidentKeyRequirement;
|
|
5463
|
+
(function (ResidentKeyRequirement) {
|
|
5464
|
+
ResidentKeyRequirement["discouraged"] = "discouraged";
|
|
5465
|
+
ResidentKeyRequirement["preferred"] = "preferred";
|
|
5466
|
+
ResidentKeyRequirement["required"] = "required";
|
|
5467
|
+
})(ResidentKeyRequirement = exports.ResidentKeyRequirement || (exports.ResidentKeyRequirement = {}));
|
|
5215
5468
|
var SAMLLogoutBehavior;
|
|
5216
5469
|
(function (SAMLLogoutBehavior) {
|
|
5217
5470
|
SAMLLogoutBehavior["AllParticipants"] = "AllParticipants";
|
|
@@ -5305,6 +5558,18 @@ var UserState;
|
|
|
5305
5558
|
UserState["AuthenticatedNotVerified"] = "AuthenticatedNotVerified";
|
|
5306
5559
|
UserState["AuthenticatedRegistrationNotVerified"] = "AuthenticatedRegistrationNotVerified";
|
|
5307
5560
|
})(UserState = exports.UserState || (exports.UserState = {}));
|
|
5561
|
+
/**
|
|
5562
|
+
* Used to express whether the Relying Party requires <a href="https://www.w3.org/TR/webauthn-2/#user-verification">user verification</a> for the
|
|
5563
|
+
* current operation.
|
|
5564
|
+
*
|
|
5565
|
+
* @author Spencer Witt
|
|
5566
|
+
*/
|
|
5567
|
+
var UserVerificationRequirement;
|
|
5568
|
+
(function (UserVerificationRequirement) {
|
|
5569
|
+
UserVerificationRequirement["required"] = "required";
|
|
5570
|
+
UserVerificationRequirement["preferred"] = "preferred";
|
|
5571
|
+
UserVerificationRequirement["discouraged"] = "discouraged";
|
|
5572
|
+
})(UserVerificationRequirement = exports.UserVerificationRequirement || (exports.UserVerificationRequirement = {}));
|
|
5308
5573
|
/**
|
|
5309
5574
|
* @author Daniel DeGroff
|
|
5310
5575
|
*/
|
|
@@ -5313,6 +5578,18 @@ var VerificationStrategy;
|
|
|
5313
5578
|
VerificationStrategy["ClickableLink"] = "ClickableLink";
|
|
5314
5579
|
VerificationStrategy["FormField"] = "FormField";
|
|
5315
5580
|
})(VerificationStrategy = exports.VerificationStrategy || (exports.VerificationStrategy = {}));
|
|
5581
|
+
/**
|
|
5582
|
+
* Identifies the WebAuthn workflow. This will affect the parameters used for credential creation
|
|
5583
|
+
* and request based on the Tenant configuration.
|
|
5584
|
+
*
|
|
5585
|
+
* @author Spencer Witt
|
|
5586
|
+
*/
|
|
5587
|
+
var WebAuthnWorkflow;
|
|
5588
|
+
(function (WebAuthnWorkflow) {
|
|
5589
|
+
WebAuthnWorkflow["bootstrap"] = "bootstrap";
|
|
5590
|
+
WebAuthnWorkflow["general"] = "general";
|
|
5591
|
+
WebAuthnWorkflow["reauthentication"] = "reauthentication";
|
|
5592
|
+
})(WebAuthnWorkflow = exports.WebAuthnWorkflow || (exports.WebAuthnWorkflow = {}));
|
|
5316
5593
|
var XMLSignatureLocation;
|
|
5317
5594
|
(function (XMLSignatureLocation) {
|
|
5318
5595
|
XMLSignatureLocation["Assertion"] = "Assertion";
|