diff options
author | Matthew Miller <matthew@millerti.me> | 2022-07-27 22:13:40 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2022-07-27 22:13:40 -0700 |
commit | 6b3859b5e3323f87b462bb6229451aa6e897295a (patch) | |
tree | ad7dd8344659e4714f65b42c70e49c8a749569c0 /packages/server/src | |
parent | 2fbf3bb8f218a749bc29dd37d5bb677a85d2cf5f (diff) |
Export named decodeAttestationObject()
Diffstat (limited to 'packages/server/src')
-rw-r--r-- | packages/server/src/helpers/decodeAttestationObject.ts | 2 | ||||
-rw-r--r-- | packages/server/src/helpers/index.ts | 2 | ||||
-rw-r--r-- | packages/server/src/registration/verifyRegistrationResponse.ts | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/packages/server/src/helpers/decodeAttestationObject.ts b/packages/server/src/helpers/decodeAttestationObject.ts index 3aa39d7..5385106 100644 --- a/packages/server/src/helpers/decodeAttestationObject.ts +++ b/packages/server/src/helpers/decodeAttestationObject.ts @@ -5,7 +5,7 @@ import cbor from 'cbor'; * * @param base64AttestationObject Attestation Object buffer */ -export default function decodeAttestationObject(attestationObject: Buffer): AttestationObject { +export function decodeAttestationObject(attestationObject: Buffer): AttestationObject { const toCBOR: AttestationObject = cbor.decodeAllSync(attestationObject)[0]; return toCBOR; } diff --git a/packages/server/src/helpers/index.ts b/packages/server/src/helpers/index.ts index 43a2ae2..c157d7e 100644 --- a/packages/server/src/helpers/index.ts +++ b/packages/server/src/helpers/index.ts @@ -2,7 +2,7 @@ import { convertAAGUIDToString } from './convertAAGUIDToString'; import { convertCertBufferToPEM } from './convertCertBufferToPEM'; import { convertCOSEtoPKCS } from './convertCOSEtoPKCS'; import { convertPublicKeyToPEM } from './convertPublicKeyToPEM'; -import decodeAttestationObject from './decodeAttestationObject'; +import { decodeAttestationObject } from './decodeAttestationObject'; import { decodeCborFirst } from './decodeCbor'; import decodeClientDataJSON from './decodeClientDataJSON'; import decodeCredentialPublicKey from './decodeCredentialPublicKey'; diff --git a/packages/server/src/registration/verifyRegistrationResponse.ts b/packages/server/src/registration/verifyRegistrationResponse.ts index b701118..62a1e39 100644 --- a/packages/server/src/registration/verifyRegistrationResponse.ts +++ b/packages/server/src/registration/verifyRegistrationResponse.ts @@ -5,9 +5,10 @@ import { CredentialDeviceType, } from '@simplewebauthn/typescript-types'; -import decodeAttestationObject, { +import { AttestationFormat, AttestationStatement, + decodeAttestationObject, } from '../helpers/decodeAttestationObject'; import { AuthenticationExtensionsAuthenticatorOutputs } from '../helpers/decodeAuthenticatorExtensions'; import decodeClientDataJSON from '../helpers/decodeClientDataJSON'; |