diff options
author | Matthew Miller <matthew@millerti.me> | 2021-08-02 11:23:20 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2021-08-02 11:23:20 -0700 |
commit | e317f261e61417e21b7c06da182befaf096b3d89 (patch) | |
tree | 72cf10d1ac8f8ce063321b5c3a0ad0eb60dd6865 /packages/server/src/helpers/decodeAttestationObject.ts | |
parent | 06097255f04fd043865d721a6eeb43e6b350a012 (diff) |
Refactor attestation format type
Diffstat (limited to 'packages/server/src/helpers/decodeAttestationObject.ts')
-rw-r--r-- | packages/server/src/helpers/decodeAttestationObject.ts | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/packages/server/src/helpers/decodeAttestationObject.ts b/packages/server/src/helpers/decodeAttestationObject.ts index 8b69c90..3aa39d7 100644 --- a/packages/server/src/helpers/decodeAttestationObject.ts +++ b/packages/server/src/helpers/decodeAttestationObject.ts @@ -10,18 +10,17 @@ export default function decodeAttestationObject(attestationObject: Buffer): Atte return toCBOR; } -export enum ATTESTATION_FORMAT { - FIDO_U2F = 'fido-u2f', - PACKED = 'packed', - ANDROID_SAFETYNET = 'android-safetynet', - ANDROID_KEY = 'android-key', - TPM = 'tpm', - APPLE = 'apple', - NONE = 'none', -} +export type AttestationFormat = + | 'fido-u2f' + | 'packed' + | 'android-safetynet' + | 'android-key' + | 'tpm' + | 'apple' + | 'none'; export type AttestationObject = { - fmt: ATTESTATION_FORMAT; + fmt: AttestationFormat; attStmt: AttestationStatement; authData: Buffer; }; |