summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src/helpers/decodeAttestationObject.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2021-08-02 11:23:20 -0700
committerMatthew Miller <matthew@millerti.me>2021-08-02 11:23:20 -0700
commite317f261e61417e21b7c06da182befaf096b3d89 (patch)
tree72cf10d1ac8f8ce063321b5c3a0ad0eb60dd6865 /packages/server/src/helpers/decodeAttestationObject.ts
parent06097255f04fd043865d721a6eeb43e6b350a012 (diff)
Refactor attestation format type
Diffstat (limited to 'packages/server/src/helpers/decodeAttestationObject.ts')
-rw-r--r--packages/server/src/helpers/decodeAttestationObject.ts19
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;
};