diff options
author | Matthew Miller <matthew@millerti.me> | 2020-05-19 14:27:37 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2020-05-19 14:27:37 -0700 |
commit | b71cba978a21b74dcef12128af2a4a9e8bbd66f8 (patch) | |
tree | 26fad5e9e3f1fccf61a8d716399b7f954e5e8500 /src | |
parent | 5fac314d0623d63515a461b108104d3a3e8af5db (diff) |
Spruce up some comments
Diffstat (limited to 'src')
-rw-r--r-- | src/attestation/verifyAttestationResponse.ts | 3 | ||||
-rw-r--r-- | src/helpers/decodeClientDataJSON.ts | 3 | ||||
-rw-r--r-- | src/types.ts | 10 |
3 files changed, 11 insertions, 5 deletions
diff --git a/src/attestation/verifyAttestationResponse.ts b/src/attestation/verifyAttestationResponse.ts index 2c1cd60..f449293 100644 --- a/src/attestation/verifyAttestationResponse.ts +++ b/src/attestation/verifyAttestationResponse.ts @@ -9,7 +9,8 @@ import verifyAndroidSafetynet from './verifications/verifyAndroidSafetyNet'; /** * Verify that the user has legitimately completed the registration process - * @param response + * + * @param response Authenticator attestation response with base64-encoded values * @param expectedOrigin Expected URL of website attestation should have occurred on */ export default function verifyAttestationResponse( diff --git a/src/helpers/decodeClientDataJSON.ts b/src/helpers/decodeClientDataJSON.ts index 2b5bbbd..80a4961 100644 --- a/src/helpers/decodeClientDataJSON.ts +++ b/src/helpers/decodeClientDataJSON.ts @@ -4,9 +4,6 @@ import asciiToBinary from './asciiToBinary'; /** * Decode an authenticator's base64-encoded clientDataJSON to JSON - * - * @param data - * @returns {Object} - the data as JSON */ export default function decodeClientDataJSON(data: string): ClientDataJSON { const toString = asciiToBinary(data); diff --git a/src/types.ts b/src/types.ts index c419727..b528978 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,7 +1,13 @@ +/** + * An object that can be passed into navigator.credentials.create(...) in the browser + */ export type AttestationCredentials = { publicKey: PublicKeyCredentialCreationOptions, }; +/** + * An object that can be passed into navigator.credentials.get(...) in the browser + */ export type AssertionCredentials = { publicKey: PublicKeyCredentialRequestOptions, }; @@ -111,6 +117,8 @@ export type ParsedAssertionAuthData = { counterBuf: Buffer, }; -// U2F Presence constant +/** + * U2F Presence constant + */ export const U2F_USER_PRESENTED = 0x01; |