Skip to content

Commit

Permalink
[browser-ponyfill] Change JSON types to the extended versions and exp…
Browse files Browse the repository at this point in the history
…ort all.
  • Loading branch information
lgarron committed Jun 30, 2022
1 parent 33dd44e commit b96e608
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/webauthn-json/browser-ponyfill.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
import {
createExtendedRequestFromJSON as parseCreationOptionsFromJSON,
createExtendedResponseToJSON,
CredentialCreationOptionsExtendedJSON,
CredentialRequestOptionsExtendedJSON,
getExtendedRequestFromJSON as parseRequestOptionsFromJSON,
getExtendedResponseToJSON,
PublicKeyCredentialWithAssertionExtendedResultsJSON as AuthenticationResponseJSON,
PublicKeyCredentialWithAttestationExtendedResultsJSON as RegistrationResponseJSON,
PublicKeyCredentialWithAssertionExtendedResultsJSON as AuthenticationResponseExtendedJSON,
PublicKeyCredentialWithAttestationExtendedResultsJSON as RegistrationResponseExtendedJSON,
supported,
} from "./extended";

export { parseCreationOptionsFromJSON, parseRequestOptionsFromJSON, supported };
export type { AuthenticationResponseJSON, RegistrationResponseJSON };
export type {
CredentialCreationOptionsExtendedJSON,
CredentialRequestOptionsExtendedJSON,
AuthenticationResponseExtendedJSON,
RegistrationResponseExtendedJSON,
};

export interface RegistrationPublicKeyCredential extends PublicKeyCredential {
toJSON(): RegistrationResponseJSON;
toJSON(): RegistrationResponseExtendedJSON;
}

export async function create(
Expand All @@ -26,7 +33,7 @@ export async function create(
}

export interface AuthenticationPublicKeyCredential extends PublicKeyCredential {
toJSON(): AuthenticationResponseJSON;
toJSON(): AuthenticationResponseExtendedJSON;
}

export async function get(
Expand Down

0 comments on commit b96e608

Please sign in to comment.