Skip to content

Commit

Permalink
Start work on prf support. Addresses #65.
Browse files Browse the repository at this point in the history
We need a way for the schema to specify that all the *values* of an object need to be translated for arbitrary keys.
  • Loading branch information
lgarron committed Sep 19, 2022
1 parent c003644 commit f2d5d60
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/webauthn-json/extended/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ import {
AuthenticatorAttestationResponseJSON,
} from "../basic/json";

interface AuthenticationExtensionsPRFValuesJSON {
first: Base64urlString;
second?: Base64urlString;
}

interface ExtendedExtensionsClientInputsJSON {
appid?: string;
appidExclude?: string;
Expand All @@ -19,6 +24,18 @@ interface ExtendedExtensionsClientInputsJSON {
read?: boolean;
write?: Base64urlString;
};
prf?: {
eval: AuthenticationExtensionsPRFValuesJSON;
evalByCredential: Record<
Base64urlString,
AuthenticationExtensionsPRFValuesJSON
>;
};
}

interface AuthenticationExtensionsPRFOutputsJSON {
enabled?: boolean;
results?: AuthenticationExtensionsPRFValuesJSON;
}

interface ExtendedAuthenticationExtensionsClientOutputsJSON {
Expand All @@ -33,6 +50,7 @@ interface ExtendedAuthenticationExtensionsClientOutputsJSON {
blob?: Base64urlString;
written?: boolean;
};
prf?: AuthenticationExtensionsPRFOutputsJSON;
}

interface PublicKeyCredentialCreationOptionsExtendedJSON
Expand Down

0 comments on commit f2d5d60

Please sign in to comment.