@dfns/sdk 0.7.15 → 0.7.17

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.
@@ -284,15 +284,28 @@ export type CreateCredentialChallengeResponse = {
284
284
  authenticatorAttachment?: ("platform" | "cross-platform") | undefined;
285
285
  residentKey: "required" | "preferred" | "discouraged";
286
286
  requireResidentKey: boolean;
287
+ /** Value indicating if the user should be prompted for a second factor. Can be one of the following values:
288
+ * required to indicate the user must be prompted for their pin, biometrics, or another second factor option
289
+ * preferred to indicate the user should be prompted for a second factor if it is supported
290
+ * discouraged to indicate the user should not be prompted for their second factor unless the device requires it
291
+ */
287
292
  userVerification: "required" | "preferred" | "discouraged";
288
293
  };
294
+ /** Identifies the information needed to verify the user's signing certificate; can be one of the following:
295
+ * none: indicates no attestation data is required
296
+ * indirect: indicates the attestation data should be given, but that it can be generated using an Anonymization CA
297
+ * direct: indicates the attestation data must be given and should be generated by the authenticator
298
+ * enterprise: indicates the attestation data should include information to uniquely identify the user's device
299
+ */
289
300
  attestation: "none" | "indirect" | "direct" | "enterprise";
290
301
  pubKeyCredParams: {
291
302
  type: "public-key";
292
303
  alg: number;
293
304
  }[];
294
305
  excludeCredentials: {
306
+ /** Is always `public-key`. */
295
307
  type: "public-key";
308
+ /** ID that identifies the credential. */
296
309
  id: string;
297
310
  }[];
298
311
  /** @deprecated use challengeIdentifier instead */
@@ -310,6 +323,12 @@ export type CreateCredentialChallengeResponse = {
310
323
  id: string;
311
324
  name: string;
312
325
  } | undefined;
326
+ /** Identifies the information needed to verify the user's signing certificate; can be one of the following:
327
+ * none: indicates no attestation data is required
328
+ * indirect: indicates the attestation data should be given, but that it can be generated using an Anonymization CA
329
+ * direct: indicates the attestation data must be given and should be generated by the authenticator
330
+ * enterprise: indicates the attestation data should include information to uniquely identify the user's device
331
+ */
313
332
  attestation: "none" | "indirect" | "direct" | "enterprise";
314
333
  pubKeyCredParams: {
315
334
  type: "public-key";
@@ -330,6 +349,12 @@ export type CreateCredentialChallengeResponse = {
330
349
  id: string;
331
350
  name: string;
332
351
  } | undefined;
352
+ /** Identifies the information needed to verify the user's signing certificate; can be one of the following:
353
+ * none: indicates no attestation data is required
354
+ * indirect: indicates the attestation data should be given, but that it can be generated using an Anonymization CA
355
+ * direct: indicates the attestation data must be given and should be generated by the authenticator
356
+ * enterprise: indicates the attestation data should include information to uniquely identify the user's device
357
+ */
333
358
  attestation: "none" | "indirect" | "direct" | "enterprise";
334
359
  pubKeyCredParams: {
335
360
  type: "public-key";
@@ -350,6 +375,12 @@ export type CreateCredentialChallengeResponse = {
350
375
  id: string;
351
376
  name: string;
352
377
  } | undefined;
378
+ /** Identifies the information needed to verify the user's signing certificate; can be one of the following:
379
+ * none: indicates no attestation data is required
380
+ * indirect: indicates the attestation data should be given, but that it can be generated using an Anonymization CA
381
+ * direct: indicates the attestation data must be given and should be generated by the authenticator
382
+ * enterprise: indicates the attestation data should include information to uniquely identify the user's device
383
+ */
353
384
  attestation: "none" | "indirect" | "direct" | "enterprise";
354
385
  pubKeyCredParams: {
355
386
  type: "public-key";
@@ -411,15 +442,28 @@ export type CreateCredentialChallengeWithCodeResponse = {
411
442
  authenticatorAttachment?: ("platform" | "cross-platform") | undefined;
412
443
  residentKey: "required" | "preferred" | "discouraged";
413
444
  requireResidentKey: boolean;
445
+ /** Value indicating if the user should be prompted for a second factor. Can be one of the following values:
446
+ * required to indicate the user must be prompted for their pin, biometrics, or another second factor option
447
+ * preferred to indicate the user should be prompted for a second factor if it is supported
448
+ * discouraged to indicate the user should not be prompted for their second factor unless the device requires it
449
+ */
414
450
  userVerification: "required" | "preferred" | "discouraged";
415
451
  };
452
+ /** Identifies the information needed to verify the user's signing certificate; can be one of the following:
453
+ * none: indicates no attestation data is required
454
+ * indirect: indicates the attestation data should be given, but that it can be generated using an Anonymization CA
455
+ * direct: indicates the attestation data must be given and should be generated by the authenticator
456
+ * enterprise: indicates the attestation data should include information to uniquely identify the user's device
457
+ */
416
458
  attestation: "none" | "indirect" | "direct" | "enterprise";
417
459
  pubKeyCredParams: {
418
460
  type: "public-key";
419
461
  alg: number;
420
462
  }[];
421
463
  excludeCredentials: {
464
+ /** Is always `public-key`. */
422
465
  type: "public-key";
466
+ /** ID that identifies the credential. */
423
467
  id: string;
424
468
  }[];
425
469
  /** @deprecated use challengeIdentifier instead */
@@ -437,6 +481,12 @@ export type CreateCredentialChallengeWithCodeResponse = {
437
481
  id: string;
438
482
  name: string;
439
483
  } | undefined;
484
+ /** Identifies the information needed to verify the user's signing certificate; can be one of the following:
485
+ * none: indicates no attestation data is required
486
+ * indirect: indicates the attestation data should be given, but that it can be generated using an Anonymization CA
487
+ * direct: indicates the attestation data must be given and should be generated by the authenticator
488
+ * enterprise: indicates the attestation data should include information to uniquely identify the user's device
489
+ */
440
490
  attestation: "none" | "indirect" | "direct" | "enterprise";
441
491
  pubKeyCredParams: {
442
492
  type: "public-key";
@@ -457,6 +507,12 @@ export type CreateCredentialChallengeWithCodeResponse = {
457
507
  id: string;
458
508
  name: string;
459
509
  } | undefined;
510
+ /** Identifies the information needed to verify the user's signing certificate; can be one of the following:
511
+ * none: indicates no attestation data is required
512
+ * indirect: indicates the attestation data should be given, but that it can be generated using an Anonymization CA
513
+ * direct: indicates the attestation data must be given and should be generated by the authenticator
514
+ * enterprise: indicates the attestation data should include information to uniquely identify the user's device
515
+ */
460
516
  attestation: "none" | "indirect" | "direct" | "enterprise";
461
517
  pubKeyCredParams: {
462
518
  type: "public-key";
@@ -477,6 +533,12 @@ export type CreateCredentialChallengeWithCodeResponse = {
477
533
  id: string;
478
534
  name: string;
479
535
  } | undefined;
536
+ /** Identifies the information needed to verify the user's signing certificate; can be one of the following:
537
+ * none: indicates no attestation data is required
538
+ * indirect: indicates the attestation data should be given, but that it can be generated using an Anonymization CA
539
+ * direct: indicates the attestation data must be given and should be generated by the authenticator
540
+ * enterprise: indicates the attestation data should include information to uniquely identify the user's device
541
+ */
480
542
  attestation: "none" | "indirect" | "direct" | "enterprise";
481
543
  pubKeyCredParams: {
482
544
  type: "public-key";
@@ -619,15 +681,28 @@ export type CreateDelegatedRecoveryChallengeResponse = {
619
681
  authenticatorAttachment?: ("platform" | "cross-platform") | undefined;
620
682
  residentKey: "required" | "preferred" | "discouraged";
621
683
  requireResidentKey: boolean;
684
+ /** Value indicating if the user should be prompted for a second factor. Can be one of the following values:
685
+ * required to indicate the user must be prompted for their pin, biometrics, or another second factor option
686
+ * preferred to indicate the user should be prompted for a second factor if it is supported
687
+ * discouraged to indicate the user should not be prompted for their second factor unless the device requires it
688
+ */
622
689
  userVerification: "required" | "preferred" | "discouraged";
623
690
  };
691
+ /** Identifies the information needed to verify the user's signing certificate; can be one of the following:
692
+ * none: indicates no attestation data is required
693
+ * indirect: indicates the attestation data should be given, but that it can be generated using an Anonymization CA
694
+ * direct: indicates the attestation data must be given and should be generated by the authenticator
695
+ * enterprise: indicates the attestation data should include information to uniquely identify the user's device
696
+ */
624
697
  attestation: "none" | "indirect" | "direct" | "enterprise";
625
698
  pubKeyCredParams: {
626
699
  type: "public-key";
627
700
  alg: number;
628
701
  }[];
629
702
  excludeCredentials: {
703
+ /** Is always `public-key`. */
630
704
  type: "public-key";
705
+ /** ID that identifies the credential. */
631
706
  id: string;
632
707
  }[];
633
708
  otpUrl: string;
@@ -664,15 +739,28 @@ export type CreateDelegatedRegistrationChallengeResponse = {
664
739
  authenticatorAttachment?: ("platform" | "cross-platform") | undefined;
665
740
  residentKey: "required" | "preferred" | "discouraged";
666
741
  requireResidentKey: boolean;
742
+ /** Value indicating if the user should be prompted for a second factor. Can be one of the following values:
743
+ * required to indicate the user must be prompted for their pin, biometrics, or another second factor option
744
+ * preferred to indicate the user should be prompted for a second factor if it is supported
745
+ * discouraged to indicate the user should not be prompted for their second factor unless the device requires it
746
+ */
667
747
  userVerification: "required" | "preferred" | "discouraged";
668
748
  };
749
+ /** Identifies the information needed to verify the user's signing certificate; can be one of the following:
750
+ * none: indicates no attestation data is required
751
+ * indirect: indicates the attestation data should be given, but that it can be generated using an Anonymization CA
752
+ * direct: indicates the attestation data must be given and should be generated by the authenticator
753
+ * enterprise: indicates the attestation data should include information to uniquely identify the user's device
754
+ */
669
755
  attestation: "none" | "indirect" | "direct" | "enterprise";
670
756
  pubKeyCredParams: {
671
757
  type: "public-key";
672
758
  alg: number;
673
759
  }[];
674
760
  excludeCredentials: {
761
+ /** Is always `public-key`. */
675
762
  type: "public-key";
763
+ /** ID that identifies the credential. */
676
764
  id: string;
677
765
  }[];
678
766
  otpUrl: string;
@@ -686,34 +774,64 @@ export type CreateLoginChallengeBody = {
686
774
  loginCode?: string | undefined;
687
775
  };
688
776
  export type CreateLoginChallengeResponse = {
777
+ /** Challenge (string) to be signed by the requester with his private key. */
689
778
  challenge: string;
779
+ /** A JWT that identifies the signing session. */
690
780
  challengeIdentifier: string;
781
+ /** Deprecated. Should not be used. */
691
782
  rp?: {
692
783
  id: string;
693
784
  name: string;
694
785
  } | undefined;
786
+ /** Identifies the kind of credentials that can be used to sign the user action. */
695
787
  supportedCredentialKinds: {
788
+ /** The kind of credential. */
696
789
  kind: "Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey" | "PasswordProtectedKey";
790
+ /** Indicates if the credential can be used as a first factor, second factor, or either; can be `first`, `second`, or `either`. */
697
791
  factor: "first" | "second" | "either";
792
+ /** When true indicates a second factor credential is required if the credential is used as a first factor. */
698
793
  requiresSecondFactor: boolean;
699
794
  }[];
795
+ /** Value indicating if the user should be prompted for a second factor. Can be one of the following values:
796
+ * required to indicate the user must be prompted for their pin, biometrics, or another second factor option
797
+ * preferred to indicate the user should be prompted for a second factor if it is supported
798
+ * discouraged to indicate the user should not be prompted for their second factor unless the device requires it
799
+ */
700
800
  userVerification: "required" | "preferred" | "discouraged";
801
+ /** Identifies the information needed to verify the user's signing certificate; can be one of the following:
802
+ * none: indicates no attestation data is required
803
+ * indirect: indicates the attestation data should be given, but that it can be generated using an Anonymization CA
804
+ * direct: indicates the attestation data must be given and should be generated by the authenticator
805
+ * enterprise: indicates the attestation data should include information to uniquely identify the user's device
806
+ */
701
807
  attestation: "none" | "indirect" | "direct" | "enterprise";
808
+ /** List of credentials that the user can use to sign the user action. */
702
809
  allowCredentials: {
810
+ /** List of keys that the user can use to sign the user action. */
703
811
  key: {
812
+ /** Is always `public-key`. */
704
813
  type: "public-key";
814
+ /** ID that identifies the credential. */
705
815
  id: string;
706
816
  }[];
817
+ /** List of password protected keys that the user can use to sign the login challenge. */
707
818
  passwordProtectedKey?: {
819
+ /** Is always `public-key`. */
708
820
  type: "public-key";
821
+ /** ID that identifies the credential. */
709
822
  id: string;
823
+ /** Encrypted Private Key. Only the user knows the password to decrypt it and have access to the private key. */
710
824
  encryptedPrivateKey: string;
711
825
  }[] | undefined;
826
+ /** List of WebAuthn credentials that the user can use to sign the user action. */
712
827
  webauthn: {
828
+ /** Is always `public-key`. */
713
829
  type: "public-key";
830
+ /** ID that identifies the credential. */
714
831
  id: string;
715
832
  }[];
716
833
  };
834
+ /** Optional url containing a secret value that can be used to enable cross device/origin signing. */
717
835
  externalAuthenticationUrl: string;
718
836
  };
719
837
  export type CreateLoginChallengeRequest = {
@@ -775,15 +893,28 @@ export type CreateRecoveryChallengeResponse = {
775
893
  authenticatorAttachment?: ("platform" | "cross-platform") | undefined;
776
894
  residentKey: "required" | "preferred" | "discouraged";
777
895
  requireResidentKey: boolean;
896
+ /** Value indicating if the user should be prompted for a second factor. Can be one of the following values:
897
+ * required to indicate the user must be prompted for their pin, biometrics, or another second factor option
898
+ * preferred to indicate the user should be prompted for a second factor if it is supported
899
+ * discouraged to indicate the user should not be prompted for their second factor unless the device requires it
900
+ */
778
901
  userVerification: "required" | "preferred" | "discouraged";
779
902
  };
903
+ /** Identifies the information needed to verify the user's signing certificate; can be one of the following:
904
+ * none: indicates no attestation data is required
905
+ * indirect: indicates the attestation data should be given, but that it can be generated using an Anonymization CA
906
+ * direct: indicates the attestation data must be given and should be generated by the authenticator
907
+ * enterprise: indicates the attestation data should include information to uniquely identify the user's device
908
+ */
780
909
  attestation: "none" | "indirect" | "direct" | "enterprise";
781
910
  pubKeyCredParams: {
782
911
  type: "public-key";
783
912
  alg: number;
784
913
  }[];
785
914
  excludeCredentials: {
915
+ /** Is always `public-key`. */
786
916
  type: "public-key";
917
+ /** ID that identifies the credential. */
787
918
  id: string;
788
919
  }[];
789
920
  otpUrl: string;
@@ -820,15 +951,28 @@ export type CreateRegistrationChallengeResponse = {
820
951
  authenticatorAttachment?: ("platform" | "cross-platform") | undefined;
821
952
  residentKey: "required" | "preferred" | "discouraged";
822
953
  requireResidentKey: boolean;
954
+ /** Value indicating if the user should be prompted for a second factor. Can be one of the following values:
955
+ * required to indicate the user must be prompted for their pin, biometrics, or another second factor option
956
+ * preferred to indicate the user should be prompted for a second factor if it is supported
957
+ * discouraged to indicate the user should not be prompted for their second factor unless the device requires it
958
+ */
823
959
  userVerification: "required" | "preferred" | "discouraged";
824
960
  };
961
+ /** Identifies the information needed to verify the user's signing certificate; can be one of the following:
962
+ * none: indicates no attestation data is required
963
+ * indirect: indicates the attestation data should be given, but that it can be generated using an Anonymization CA
964
+ * direct: indicates the attestation data must be given and should be generated by the authenticator
965
+ * enterprise: indicates the attestation data should include information to uniquely identify the user's device
966
+ */
825
967
  attestation: "none" | "indirect" | "direct" | "enterprise";
826
968
  pubKeyCredParams: {
827
969
  type: "public-key";
828
970
  alg: number;
829
971
  }[];
830
972
  excludeCredentials: {
973
+ /** Is always `public-key`. */
831
974
  type: "public-key";
975
+ /** ID that identifies the credential. */
832
976
  id: string;
833
977
  }[];
834
978
  otpUrl: string;
@@ -913,15 +1057,28 @@ export type CreateSocialRegistrationChallengeResponse = {
913
1057
  authenticatorAttachment?: ("platform" | "cross-platform") | undefined;
914
1058
  residentKey: "required" | "preferred" | "discouraged";
915
1059
  requireResidentKey: boolean;
1060
+ /** Value indicating if the user should be prompted for a second factor. Can be one of the following values:
1061
+ * required to indicate the user must be prompted for their pin, biometrics, or another second factor option
1062
+ * preferred to indicate the user should be prompted for a second factor if it is supported
1063
+ * discouraged to indicate the user should not be prompted for their second factor unless the device requires it
1064
+ */
916
1065
  userVerification: "required" | "preferred" | "discouraged";
917
1066
  };
1067
+ /** Identifies the information needed to verify the user's signing certificate; can be one of the following:
1068
+ * none: indicates no attestation data is required
1069
+ * indirect: indicates the attestation data should be given, but that it can be generated using an Anonymization CA
1070
+ * direct: indicates the attestation data must be given and should be generated by the authenticator
1071
+ * enterprise: indicates the attestation data should include information to uniquely identify the user's device
1072
+ */
918
1073
  attestation: "none" | "indirect" | "direct" | "enterprise";
919
1074
  pubKeyCredParams: {
920
1075
  type: "public-key";
921
1076
  alg: number;
922
1077
  }[];
923
1078
  excludeCredentials: {
1079
+ /** Is always `public-key`. */
924
1080
  type: "public-key";
1081
+ /** ID that identifies the credential. */
925
1082
  id: string;
926
1083
  }[];
927
1084
  otpUrl: string;
@@ -966,109 +1123,171 @@ export type CreateUserRequest = {
966
1123
  body: CreateUserBody;
967
1124
  };
968
1125
  export type CreateUserActionChallengeBody = {
1126
+ /** Optional indicator of which Dfns service being called. */
969
1127
  userActionServerKind?: ("Api" | "Staff") | undefined;
970
- userActionHttpMethod: string;
1128
+ /** The HTTP method that will be used to make the request that is being signed. */
1129
+ userActionHttpMethod: "POST" | "PUT" | "DELETE" | "GET";
1130
+ /** The path of the request that is being signed. */
971
1131
  userActionHttpPath: string;
1132
+ /** The JSON-encoded body of the request that is being signed. */
972
1133
  userActionPayload: string;
973
1134
  };
974
1135
  export type CreateUserActionChallengeResponse = {
1136
+ /** Challenge (string) to be signed by the requester with his private key. */
975
1137
  challenge: string;
1138
+ /** A JWT that identifies the signing session. */
976
1139
  challengeIdentifier: string;
1140
+ /** Deprecated. Should not be used. */
977
1141
  rp?: {
978
1142
  id: string;
979
1143
  name: string;
980
1144
  } | undefined;
1145
+ /** Identifies the kind of credentials that can be used to sign the user action. */
981
1146
  supportedCredentialKinds: {
1147
+ /** The kind of credential. */
982
1148
  kind: "Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey" | "PasswordProtectedKey";
1149
+ /** Indicates if the credential can be used as a first factor, second factor, or either; can be `first`, `second`, or `either`. */
983
1150
  factor: "first" | "second" | "either";
1151
+ /** When true indicates a second factor credential is required if the credential is used as a first factor. */
984
1152
  requiresSecondFactor: boolean;
985
1153
  }[];
1154
+ /** Value indicating if the user should be prompted for a second factor. Can be one of the following values:
1155
+ * required to indicate the user must be prompted for their pin, biometrics, or another second factor option
1156
+ * preferred to indicate the user should be prompted for a second factor if it is supported
1157
+ * discouraged to indicate the user should not be prompted for their second factor unless the device requires it
1158
+ */
986
1159
  userVerification: "required" | "preferred" | "discouraged";
1160
+ /** Identifies the information needed to verify the user's signing certificate; can be one of the following:
1161
+ * none: indicates no attestation data is required
1162
+ * indirect: indicates the attestation data should be given, but that it can be generated using an Anonymization CA
1163
+ * direct: indicates the attestation data must be given and should be generated by the authenticator
1164
+ * enterprise: indicates the attestation data should include information to uniquely identify the user's device
1165
+ */
987
1166
  attestation: "none" | "indirect" | "direct" | "enterprise";
1167
+ /** List of credentials that the user can use to sign the user action. */
988
1168
  allowCredentials: {
1169
+ /** List of keys that the user can use to sign the user action. */
989
1170
  key: {
1171
+ /** Is always `public-key`. */
990
1172
  type: "public-key";
1173
+ /** ID that identifies the credential. */
991
1174
  id: string;
992
1175
  }[];
1176
+ /** List of password protected keys that the user can use to sign the login challenge. */
993
1177
  passwordProtectedKey?: {
1178
+ /** Is always `public-key`. */
994
1179
  type: "public-key";
1180
+ /** ID that identifies the credential. */
995
1181
  id: string;
1182
+ /** Encrypted Private Key. Only the user knows the password to decrypt it and have access to the private key. */
996
1183
  encryptedPrivateKey: string;
997
1184
  }[] | undefined;
1185
+ /** List of WebAuthn credentials that the user can use to sign the user action. */
998
1186
  webauthn: {
1187
+ /** Is always `public-key`. */
999
1188
  type: "public-key";
1189
+ /** ID that identifies the credential. */
1000
1190
  id: string;
1001
1191
  }[];
1002
1192
  };
1193
+ /** Optional url containing a secret value that can be used to enable cross device/origin signing. */
1003
1194
  externalAuthenticationUrl: string;
1004
1195
  };
1005
1196
  export type CreateUserActionChallengeRequest = {
1006
1197
  body: CreateUserActionChallengeBody;
1007
1198
  };
1008
1199
  export type CreateUserActionSignatureBody = {
1009
- /** Temporary authentication token returned by the [Create User Action Signature Challenge](https://docs.dfns.co/api-reference/auth/create-user-action-challenge) */
1200
+ /** Temporary authentication token returned by the Create Challenge endpoint. */
1010
1201
  challengeIdentifier: string;
1011
- /** First factor credential used to sign the user action */
1202
+ /** First factor credential used to sign the challenge. */
1012
1203
  firstFactor: {
1013
1204
  kind: "Fido2";
1014
1205
  credentialAssertion: {
1206
+ /** Base64url-encoded id of the credential returned by the user's WebAuthn client. */
1015
1207
  credId: string;
1208
+ /** Base64url-encoded, stringified JSON [client data](https://docs.dfns.co/api-reference/auth/credentials-data#client-data) object returned by the user's WebAuthn client. */
1016
1209
  clientData: string;
1210
+ /** Base64url-encoded signature returned by the user's WebAuthn client. */
1017
1211
  signature: string;
1212
+ /** The algorithm/digest that the credential will use to sign data. If the algoritm is not specified then the algorithm will be determined by the key. */
1018
1213
  algorithm?: string | undefined;
1214
+ /** Base64url encoded authenticator data object returned by the user's WebAuthn client. */
1019
1215
  authenticatorData: string;
1216
+ /** Base64url encoded userHandle returned by the user's WebAuthn client. */
1020
1217
  userHandle?: string | undefined;
1021
1218
  };
1022
1219
  } | {
1023
1220
  kind: "Key";
1024
1221
  credentialAssertion: {
1222
+ /** Base64url-encoded id of the credential returned by the user's WebAuthn client. */
1025
1223
  credId: string;
1224
+ /** Base64url-encoded, stringified JSON [client data](https://docs.dfns.co/api-reference/auth/credentials-data#client-data) object returned by the user's WebAuthn client. */
1026
1225
  clientData: string;
1226
+ /** Base64url-encoded signature returned by the user's WebAuthn client. */
1027
1227
  signature: string;
1228
+ /** The algorithm/digest that the credential will use to sign data. If the algoritm is not specified then the algorithm will be determined by the key. */
1028
1229
  algorithm?: string | undefined;
1029
1230
  };
1030
- } | {
1031
- kind: "Password";
1032
- password: string;
1033
1231
  } | {
1034
1232
  kind: "PasswordProtectedKey";
1035
1233
  credentialAssertion: {
1234
+ /** Base64url-encoded id of the credential returned by the user's WebAuthn client. */
1036
1235
  credId: string;
1236
+ /** Base64url-encoded, stringified JSON [client data](https://docs.dfns.co/api-reference/auth/credentials-data#client-data) object returned by the user's WebAuthn client. */
1037
1237
  clientData: string;
1238
+ /** Base64url-encoded signature returned by the user's WebAuthn client. */
1038
1239
  signature: string;
1240
+ /** The algorithm/digest that the credential will use to sign data. If the algoritm is not specified then the algorithm will be determined by the key. */
1039
1241
  algorithm?: string | undefined;
1040
1242
  };
1243
+ } | {
1244
+ kind: "Password";
1245
+ password: string;
1041
1246
  };
1042
- /** Second factor credential used to authenticate a user */
1247
+ /** Second factor credential used to authenticate a user. */
1043
1248
  secondFactor?: ({
1044
1249
  kind: "Fido2";
1045
1250
  credentialAssertion: {
1251
+ /** Base64url-encoded id of the credential returned by the user's WebAuthn client. */
1046
1252
  credId: string;
1253
+ /** Base64url-encoded, stringified JSON [client data](https://docs.dfns.co/api-reference/auth/credentials-data#client-data) object returned by the user's WebAuthn client. */
1047
1254
  clientData: string;
1255
+ /** Base64url-encoded signature returned by the user's WebAuthn client. */
1048
1256
  signature: string;
1257
+ /** The algorithm/digest that the credential will use to sign data. If the algoritm is not specified then the algorithm will be determined by the key. */
1049
1258
  algorithm?: string | undefined;
1259
+ /** Base64url encoded authenticator data object returned by the user's WebAuthn client. */
1050
1260
  authenticatorData: string;
1261
+ /** Base64url encoded userHandle returned by the user's WebAuthn client. */
1051
1262
  userHandle?: string | undefined;
1052
1263
  };
1053
1264
  } | {
1054
1265
  kind: "Key";
1055
1266
  credentialAssertion: {
1267
+ /** Base64url-encoded id of the credential returned by the user's WebAuthn client. */
1056
1268
  credId: string;
1269
+ /** Base64url-encoded, stringified JSON [client data](https://docs.dfns.co/api-reference/auth/credentials-data#client-data) object returned by the user's WebAuthn client. */
1057
1270
  clientData: string;
1271
+ /** Base64url-encoded signature returned by the user's WebAuthn client. */
1058
1272
  signature: string;
1273
+ /** The algorithm/digest that the credential will use to sign data. If the algoritm is not specified then the algorithm will be determined by the key. */
1059
1274
  algorithm?: string | undefined;
1060
1275
  };
1061
- } | {
1062
- kind: "Totp";
1063
- otpCode: string;
1064
1276
  } | {
1065
1277
  kind: "PasswordProtectedKey";
1066
1278
  credentialAssertion: {
1279
+ /** Base64url-encoded id of the credential returned by the user's WebAuthn client. */
1067
1280
  credId: string;
1281
+ /** Base64url-encoded, stringified JSON [client data](https://docs.dfns.co/api-reference/auth/credentials-data#client-data) object returned by the user's WebAuthn client. */
1068
1282
  clientData: string;
1283
+ /** Base64url-encoded signature returned by the user's WebAuthn client. */
1069
1284
  signature: string;
1285
+ /** The algorithm/digest that the credential will use to sign data. If the algoritm is not specified then the algorithm will be determined by the key. */
1070
1286
  algorithm?: string | undefined;
1071
1287
  };
1288
+ } | {
1289
+ kind: "Totp";
1290
+ otpCode: string;
1072
1291
  }) | undefined;
1073
1292
  };
1074
1293
  export type CreateUserActionSignatureResponse = {
@@ -1230,22 +1449,35 @@ export type GetApplicationResponse = {
1230
1449
  };
1231
1450
  export type GetApplicationRequest = GetApplicationParams;
1232
1451
  export type GetAuditLogParams = {
1233
- id: string;
1452
+ /** Log id you need information about. */
1453
+ id: string | string;
1234
1454
  };
1235
1455
  export type GetAuditLogResponse = {
1236
- id: string;
1456
+ /** Log id. */
1457
+ id: string | string;
1458
+ /** Action performed. */
1237
1459
  action: string;
1460
+ /** User Action Signature used as token for permorming this action. */
1238
1461
  actionToken: string;
1462
+ /** User who performed the action. */
1239
1463
  userId: string | null;
1464
+ /** Username who performed the action. */
1240
1465
  username: string | null;
1241
1466
  datePerformed: string | null;
1467
+ /** Cryptographic Signature details. Use these parameters if you want to validate the signature. */
1242
1468
  firstFactorCredential: {
1469
+ /** Id of the credential used to sign this action. */
1243
1470
  id: string;
1244
- kind: string;
1471
+ /** Kind of credential used to sign this action. */
1472
+ kind: ("Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey" | "PasswordProtectedKey") | null;
1473
+ /** Public Key which can be used to verify signature. */
1245
1474
  publicKey: string;
1246
1475
  assertion: {
1476
+ /** Used to verify the signature. */
1247
1477
  authenticatorData: string;
1478
+ /** Information, including challenge, which you can use to verify the signature. */
1248
1479
  clientData: string;
1480
+ /** Signature of the clientData and authenticatorData. */
1249
1481
  signature: string;
1250
1482
  };
1251
1483
  };
@@ -1386,6 +1618,7 @@ export type ListApplicationsResponse = {
1386
1618
  export type ListAuditLogsQuery = {
1387
1619
  startTime: string;
1388
1620
  endTime: string;
1621
+ /** Provide a user id to list events from that particular user only. */
1389
1622
  userId?: string | undefined;
1390
1623
  };
1391
1624
  export type ListAuditLogsResponse = string;
@@ -1504,69 +1737,97 @@ export type ListUsersRequest = {
1504
1737
  query?: ListUsersQuery;
1505
1738
  };
1506
1739
  export type LoginBody = {
1507
- /** Temporary authentication token returned by the [Create User Action Signature Challenge](https://docs.dfns.co/api-reference/auth/create-user-action-challenge) */
1740
+ /** Temporary authentication token returned by the Create Challenge endpoint. */
1508
1741
  challengeIdentifier: string;
1509
- /** First factor credential used to sign the user action */
1742
+ /** First factor credential used to sign the challenge. */
1510
1743
  firstFactor: {
1511
1744
  kind: "Fido2";
1512
1745
  credentialAssertion: {
1746
+ /** Base64url-encoded id of the credential returned by the user's WebAuthn client. */
1513
1747
  credId: string;
1748
+ /** Base64url-encoded, stringified JSON [client data](https://docs.dfns.co/api-reference/auth/credentials-data#client-data) object returned by the user's WebAuthn client. */
1514
1749
  clientData: string;
1750
+ /** Base64url-encoded signature returned by the user's WebAuthn client. */
1515
1751
  signature: string;
1752
+ /** The algorithm/digest that the credential will use to sign data. If the algoritm is not specified then the algorithm will be determined by the key. */
1516
1753
  algorithm?: string | undefined;
1754
+ /** Base64url encoded authenticator data object returned by the user's WebAuthn client. */
1517
1755
  authenticatorData: string;
1756
+ /** Base64url encoded userHandle returned by the user's WebAuthn client. */
1518
1757
  userHandle?: string | undefined;
1519
1758
  };
1520
1759
  } | {
1521
1760
  kind: "Key";
1522
1761
  credentialAssertion: {
1762
+ /** Base64url-encoded id of the credential returned by the user's WebAuthn client. */
1523
1763
  credId: string;
1764
+ /** Base64url-encoded, stringified JSON [client data](https://docs.dfns.co/api-reference/auth/credentials-data#client-data) object returned by the user's WebAuthn client. */
1524
1765
  clientData: string;
1766
+ /** Base64url-encoded signature returned by the user's WebAuthn client. */
1525
1767
  signature: string;
1768
+ /** The algorithm/digest that the credential will use to sign data. If the algoritm is not specified then the algorithm will be determined by the key. */
1526
1769
  algorithm?: string | undefined;
1527
1770
  };
1528
- } | {
1529
- kind: "Password";
1530
- password: string;
1531
1771
  } | {
1532
1772
  kind: "PasswordProtectedKey";
1533
1773
  credentialAssertion: {
1774
+ /** Base64url-encoded id of the credential returned by the user's WebAuthn client. */
1534
1775
  credId: string;
1776
+ /** Base64url-encoded, stringified JSON [client data](https://docs.dfns.co/api-reference/auth/credentials-data#client-data) object returned by the user's WebAuthn client. */
1535
1777
  clientData: string;
1778
+ /** Base64url-encoded signature returned by the user's WebAuthn client. */
1536
1779
  signature: string;
1780
+ /** The algorithm/digest that the credential will use to sign data. If the algoritm is not specified then the algorithm will be determined by the key. */
1537
1781
  algorithm?: string | undefined;
1538
1782
  };
1783
+ } | {
1784
+ kind: "Password";
1785
+ password: string;
1539
1786
  };
1540
- /** Second factor credential used to authenticate a user */
1787
+ /** Second factor credential used to authenticate a user. */
1541
1788
  secondFactor?: ({
1542
1789
  kind: "Fido2";
1543
1790
  credentialAssertion: {
1791
+ /** Base64url-encoded id of the credential returned by the user's WebAuthn client. */
1544
1792
  credId: string;
1793
+ /** Base64url-encoded, stringified JSON [client data](https://docs.dfns.co/api-reference/auth/credentials-data#client-data) object returned by the user's WebAuthn client. */
1545
1794
  clientData: string;
1795
+ /** Base64url-encoded signature returned by the user's WebAuthn client. */
1546
1796
  signature: string;
1797
+ /** The algorithm/digest that the credential will use to sign data. If the algoritm is not specified then the algorithm will be determined by the key. */
1547
1798
  algorithm?: string | undefined;
1799
+ /** Base64url encoded authenticator data object returned by the user's WebAuthn client. */
1548
1800
  authenticatorData: string;
1801
+ /** Base64url encoded userHandle returned by the user's WebAuthn client. */
1549
1802
  userHandle?: string | undefined;
1550
1803
  };
1551
1804
  } | {
1552
1805
  kind: "Key";
1553
1806
  credentialAssertion: {
1807
+ /** Base64url-encoded id of the credential returned by the user's WebAuthn client. */
1554
1808
  credId: string;
1809
+ /** Base64url-encoded, stringified JSON [client data](https://docs.dfns.co/api-reference/auth/credentials-data#client-data) object returned by the user's WebAuthn client. */
1555
1810
  clientData: string;
1811
+ /** Base64url-encoded signature returned by the user's WebAuthn client. */
1556
1812
  signature: string;
1813
+ /** The algorithm/digest that the credential will use to sign data. If the algoritm is not specified then the algorithm will be determined by the key. */
1557
1814
  algorithm?: string | undefined;
1558
1815
  };
1559
- } | {
1560
- kind: "Totp";
1561
- otpCode: string;
1562
1816
  } | {
1563
1817
  kind: "PasswordProtectedKey";
1564
1818
  credentialAssertion: {
1819
+ /** Base64url-encoded id of the credential returned by the user's WebAuthn client. */
1565
1820
  credId: string;
1821
+ /** Base64url-encoded, stringified JSON [client data](https://docs.dfns.co/api-reference/auth/credentials-data#client-data) object returned by the user's WebAuthn client. */
1566
1822
  clientData: string;
1823
+ /** Base64url-encoded signature returned by the user's WebAuthn client. */
1567
1824
  signature: string;
1825
+ /** The algorithm/digest that the credential will use to sign data. If the algoritm is not specified then the algorithm will be determined by the key. */
1568
1826
  algorithm?: string | undefined;
1569
1827
  };
1828
+ } | {
1829
+ kind: "Totp";
1830
+ otpCode: string;
1570
1831
  }) | undefined;
1571
1832
  };
1572
1833
  export type LoginResponse = {
@@ -1590,9 +1851,13 @@ export type RecoverBody = {
1590
1851
  recovery: {
1591
1852
  kind: "RecoveryKey";
1592
1853
  credentialAssertion: {
1854
+ /** Base64url-encoded id of the credential returned by the user's WebAuthn client. */
1593
1855
  credId: string;
1856
+ /** Base64url-encoded, stringified JSON [client data](https://docs.dfns.co/api-reference/auth/credentials-data#client-data) object returned by the user's WebAuthn client. */
1594
1857
  clientData: string;
1858
+ /** Base64url-encoded signature returned by the user's WebAuthn client. */
1595
1859
  signature: string;
1860
+ /** The algorithm/digest that the credential will use to sign data. If the algoritm is not specified then the algorithm will be determined by the key. */
1596
1861
  algorithm?: string | undefined;
1597
1862
  };
1598
1863
  };