summaryrefslogtreecommitdiffhomepage
path: root/packages/typescript-types
diff options
context:
space:
mode:
Diffstat (limited to 'packages/typescript-types')
-rw-r--r--packages/typescript-types/src/index.ts79
1 files changed, 79 insertions, 0 deletions
diff --git a/packages/typescript-types/src/index.ts b/packages/typescript-types/src/index.ts
index 8ba2297..5ab574f 100644
--- a/packages/typescript-types/src/index.ts
+++ b/packages/typescript-types/src/index.ts
@@ -26,6 +26,7 @@ export interface PublicKeyCredentialCreationOptionsJSON
user: PublicKeyCredentialUserEntityJSON;
challenge: Base64URLString;
excludeCredentials: PublicKeyCredentialDescriptorJSON[];
+ extensions?: CredentialCreationExtensionsInputJSON;
}
/**
@@ -36,6 +37,7 @@ export interface PublicKeyCredentialRequestOptionsJSON
extends Omit<PublicKeyCredentialRequestOptions, 'challenge' | 'allowCredentials'> {
challenge: Base64URLString;
allowCredentials?: PublicKeyCredentialDescriptorJSON[];
+ extensions?: CredentialRequestExtensionsInputJSON;
}
export interface PublicKeyCredentialDescriptorJSON
@@ -64,6 +66,7 @@ export interface AttestationCredentialJSON
rawId: Base64URLString;
response: AuthenticatorAttestationResponseJSON;
transports?: AuthenticatorTransport[];
+ clientExtensionResults?: CredentialCreationExtensionsOutputJSON;
}
/**
@@ -81,6 +84,7 @@ export interface AssertionCredentialJSON
extends Omit<AssertionCredential, 'response' | 'rawId' | 'getClientExtensionResults'> {
rawId: Base64URLString;
response: AuthenticatorAssertionResponseJSON;
+ clientExtensionResults?: CredentialRequestExtensionsOutputJSON;
}
/**
@@ -140,3 +144,78 @@ export interface AuthenticatorAttestationResponseFuture extends AuthenticatorAtt
getPublicKey?: () => ArrayBuffer;
getPublicKeyAlgorithm?: () => COSEAlgorithmIdentifier[];
}
+
+/**
+ * Client Extensions - Attestation (Registration)
+ */
+
+export interface CredentialCreationExtensionsInputJSON {
+ appidExclude?: string;
+ uvm?: boolean;
+ credProps?: {
+ first: Base64URLString;
+ second?: Base64URLString;
+ };
+ prf?: {
+ eval?: {
+ first: Base64URLString;
+ second?: Base64URLString;
+ };
+ evalByCredential?: {
+ [base64CredID: string]: { first: Base64URLString; second?: Base64URLString };
+ };
+ };
+}
+
+export interface CredentialCreationExtensionsOutputJSON {
+ appidExclude?: boolean;
+ uvm?: Array<[number, number, number]>;
+ credProps?: {
+ rk: boolean;
+ };
+ prf?: {
+ enabled?: boolean;
+ results?: {
+ first: Base64URLString;
+ second?: Base64URLString;
+ };
+ };
+}
+
+/**
+ * Client Extensions - Assertion (Authentication)
+ */
+
+export interface CredentialRequestExtensionsInputJSON {
+ appid?: string;
+ uvm?: boolean;
+ prf?: {
+ eval?: {
+ first: Base64URLString;
+ second?: Base64URLString;
+ };
+ evalByCredential?: {
+ [base64CredID: string]: { first: Base64URLString; second?: Base64URLString };
+ };
+ };
+ largeBlob?: {
+ read?: boolean;
+ write?: Base64URLString;
+ };
+}
+
+export interface CredentialRequestExtensionsOutputJSON {
+ appid?: boolean;
+ uvm?: Array<[number, number, number]>;
+ prf?: {
+ enabled?: boolean;
+ results?: {
+ first: Base64URLString;
+ second?: Base64URLString;
+ };
+ };
+ largeBlob?: {
+ blob?: Base64URLString;
+ written?: boolean;
+ };
+}