diff options
author | Matthew Miller <matthew@millerti.me> | 2020-05-25 23:57:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-25 23:57:59 -0700 |
commit | 5793fe2f0214c35038dee0f9bf37e7894805ee07 (patch) | |
tree | db2bd52ac2cb1cd55442bf9b320b4e0e36f4d8f4 /packages/typescript-types/src | |
parent | d0205b9a4f2b4e304447e8072e4384f52dcc0c51 (diff) | |
parent | ddd8889dd0b7249ed24736c0e4e89e0bd041d9c6 (diff) |
Merge pull request #11 from MasterKale/feature/exclude-credentials-attestation
feature/exclude-credentials-attestation
Diffstat (limited to 'packages/typescript-types/src')
-rw-r--r-- | packages/typescript-types/src/index.ts | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/packages/typescript-types/src/index.ts b/packages/typescript-types/src/index.ts index cab623c..353623e 100644 --- a/packages/typescript-types/src/index.ts +++ b/packages/typescript-types/src/index.ts @@ -28,6 +28,7 @@ export type PublicKeyCredentialCreationOptionsJSON = { ]; timeout?: number; attestation: 'direct' | 'indirect'; + excludeCredentials: PublicKeyCredentialDescriptorJSON[]; }; }; @@ -42,14 +43,8 @@ export type PublicKeyCredentialCreationOptionsJSON = { */ export type PublicKeyCredentialRequestOptionsJSON = { publicKey: { - // challenge: string; - allowCredentials: { - // Will be converted to a Uint8Array in the browser - id: string; - type: 'public-key'; - transports?: AuthenticatorTransport[]; - }[]; + allowCredentials: PublicKeyCredentialDescriptorJSON[]; // extensions?: AuthenticationExtensionsClientInputs, rpId?: string; timeout?: number; @@ -57,6 +52,13 @@ export type PublicKeyCredentialRequestOptionsJSON = { }; }; +export interface PublicKeyCredentialDescriptorJSON extends Omit< +PublicKeyCredentialDescriptor, 'id' +> { + // Should be a Base64-encoded credential ID. Will be converted to a Uint8Array in the browser + id: string; +} + /** * The value returned from navigator.credentials.create() */ |