Skip to content

Instantly share code, notes, and snippets.

@anaran
Created November 28, 2015 11:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anaran/e08f972a85b1f3797be1 to your computer and use it in GitHub Desktop.
Save anaran/e08f972a85b1f3797be1 to your computer and use it in GitHub Desktop.
// Copied from http://www.w3.org/Submission/2015/SUBM-fido-web-api-20151120/#api
partial interface Window {
readonly attribute FIDOCredentials fido;
};
interface FIDOCredentials {
Promise<FIDOCredentialInfo> makeCredential(Account accountInformation, sequence<FIDOCredentialParameters> cryptoParameters, DOMString attestationChallenge, optional unsigned long credentialTimeoutSeconds, optional sequence<Credential> blacklist, optional FIDOExtensions credentialExtensions);
Promise<FIDOAssertion> getAssertion(DOMString assertionChallenge, optional unsigned long assertionTimeoutSeconds, optional sequence<Credential> whitelist, optional FIDOExtensions assertionExtensions);
};
interface FIDOCredentialInfo {
readonly attribute Credential credential;
readonly attribute AlgorithmIdentifier algorithm;
readonly attribute any publicKey;
readonly attribute AttestationStatement attestation;
};
dictionary Account {
required DOMString rpDisplayName;
required DOMString displayName;
DOMString name;
DOMString id;
DOMString imageUri;
};
dictionary FIDOCredentialParameters {
required CredentialType type;
required AlgorithmIdentifier algorithm;
};
enum CredentialType {
"FIDO"
};
interface Credential {
readonly attribute CredentialType type;
readonly attribute DOMString id;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment