diff options
author | Matthew Miller <matthew@millerti.me> | 2020-05-26 15:06:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-26 15:06:52 -0700 |
commit | 467206a79d500dda939be26e238ed01e9548a215 (patch) | |
tree | 1ba854efe1e0237797654cc09c33526e2b0ad051 /packages/server/src | |
parent | 2ca49ecadf793126b8ee02bcd79a8689a7c20866 (diff) | |
parent | 806fd91211f4bef58fe015d11cd792bede2d2561 (diff) |
Merge pull request #15 from MasterKale/feature/project-rename
feature/project-rename
Diffstat (limited to 'packages/server/src')
16 files changed, 21 insertions, 21 deletions
diff --git a/packages/server/src/assertion/generateAssertionOptions.test.ts b/packages/server/src/assertion/generateAssertionOptions.test.ts index c125f48..257657b 100644 --- a/packages/server/src/assertion/generateAssertionOptions.test.ts +++ b/packages/server/src/assertion/generateAssertionOptions.test.ts @@ -5,11 +5,11 @@ test('should generate credential request options suitable for sending via JSON', const options = generateAssertionOptions( challenge, + 1, [ Buffer.from('1234', 'ascii').toString('base64'), Buffer.from('5678', 'ascii').toString('base64'), ], - 1, ); expect(options).toEqual({ @@ -33,7 +33,7 @@ test('should generate credential request options suitable for sending via JSON', }); test('defaults to 60 seconds if no timeout is specified', () => { - const options = generateAssertionOptions('totallyrandomvalue', [ + const options = generateAssertionOptions('totallyrandomvalue', undefined, [ Buffer.from('1234', 'ascii').toString('base64'), Buffer.from('5678', 'ascii').toString('base64'), ]); diff --git a/packages/server/src/assertion/generateAssertionOptions.ts b/packages/server/src/assertion/generateAssertionOptions.ts index 8a242dc..b30344d 100644 --- a/packages/server/src/assertion/generateAssertionOptions.ts +++ b/packages/server/src/assertion/generateAssertionOptions.ts @@ -1,6 +1,6 @@ import type { PublicKeyCredentialRequestOptionsJSON, -} from '@webauthntine/typescript-types'; +} from '@simplewebauthn/typescript-types'; /** * Prepare a value to pass into navigator.credentials.get(...) for authenticator "login" @@ -13,8 +13,8 @@ import type { */ export default function generateAssertionOptions( challenge: string, - allowedBase64CredentialIDs: string[], timeout = 60000, + allowedBase64CredentialIDs: string[], suggestedTransports: AuthenticatorTransport[] = ['usb', 'ble', 'nfc', 'internal'], ): PublicKeyCredentialRequestOptionsJSON { return { diff --git a/packages/server/src/assertion/verifyAssertionResponse.ts b/packages/server/src/assertion/verifyAssertionResponse.ts index 6f840c8..0d74795 100644 --- a/packages/server/src/assertion/verifyAssertionResponse.ts +++ b/packages/server/src/assertion/verifyAssertionResponse.ts @@ -3,7 +3,7 @@ import { AuthenticatorAssertionResponseJSON, AuthenticatorDevice, VerifiedAssertion, -} from '@webauthntine/typescript-types'; +} from '@simplewebauthn/typescript-types'; import decodeClientDataJSON from '@helpers/decodeClientDataJSON'; diff --git a/packages/server/src/attestation/generateAttestationOptions.test.ts b/packages/server/src/attestation/generateAttestationOptions.test.ts index dc67cf5..3885dfc 100644 --- a/packages/server/src/attestation/generateAttestationOptions.test.ts +++ b/packages/server/src/attestation/generateAttestationOptions.test.ts @@ -1,7 +1,7 @@ import generateAttestationOptions from './generateAttestationOptions'; test('should generate credential request options suitable for sending via JSON', () => { - const serviceName = 'WebAuthntine'; + const serviceName = 'SimpleWebAuthn'; const rpID = 'not.real'; const challenge = 'totallyrandomvalue'; const userID = '1234'; @@ -46,7 +46,7 @@ test('should generate credential request options suitable for sending via JSON', test('should map excluded credential IDs if specified', () => { const options = generateAttestationOptions( - 'WebAuthntine', + 'SimpleWebAuthn', 'not.real', 'totallyrandomvalue', '1234', @@ -65,7 +65,7 @@ test('should map excluded credential IDs if specified', () => { test('defaults to 60 seconds if no timeout is specified', () => { const options = generateAttestationOptions( - 'WebAuthntine', + 'SimpleWebAuthn', 'not.real', 'totallyrandomvalue', '1234', @@ -77,7 +77,7 @@ test('defaults to 60 seconds if no timeout is specified', () => { test('defaults to direct attestation if no attestation type is specified', () => { const options = generateAttestationOptions( - 'WebAuthntine', + 'SimpleWebAuthn', 'not.real', 'totallyrandomvalue', '1234', diff --git a/packages/server/src/attestation/generateAttestationOptions.ts b/packages/server/src/attestation/generateAttestationOptions.ts index 1b571ae..27931fa 100644 --- a/packages/server/src/attestation/generateAttestationOptions.ts +++ b/packages/server/src/attestation/generateAttestationOptions.ts @@ -1,4 +1,4 @@ -import { PublicKeyCredentialCreationOptionsJSON } from '@webauthntine/typescript-types'; +import { PublicKeyCredentialCreationOptionsJSON } from '@simplewebauthn/typescript-types'; /** * Prepare a value to pass into navigator.credentials.create(...) for authenticator "registration" diff --git a/packages/server/src/attestation/verifications/verifyAndroidSafetyNet.ts b/packages/server/src/attestation/verifications/verifyAndroidSafetyNet.ts index 110e665..81781b3 100644 --- a/packages/server/src/attestation/verifications/verifyAndroidSafetyNet.ts +++ b/packages/server/src/attestation/verifications/verifyAndroidSafetyNet.ts @@ -5,7 +5,7 @@ import { SafetyNetJWTHeader, SafetyNetJWTPayload, SafetyNetJWTSignature, -} from '@webauthntine/typescript-types'; +} from '@simplewebauthn/typescript-types'; import toHash from '@helpers/toHash'; import verifySignature from '@helpers/verifySignature'; diff --git a/packages/server/src/attestation/verifications/verifyFIDOU2F.ts b/packages/server/src/attestation/verifications/verifyFIDOU2F.ts index c12dc4a..3ec5f60 100644 --- a/packages/server/src/attestation/verifications/verifyFIDOU2F.ts +++ b/packages/server/src/attestation/verifications/verifyFIDOU2F.ts @@ -1,5 +1,5 @@ import base64url from 'base64url'; -import { AttestationObject, VerifiedAttestation } from '@webauthntine/typescript-types'; +import { AttestationObject, VerifiedAttestation } from '@simplewebauthn/typescript-types'; import toHash from '@helpers/toHash'; import convertCOSEtoPKCS from '@helpers/convertCOSEtoPKCS'; diff --git a/packages/server/src/attestation/verifications/verifyNone.ts b/packages/server/src/attestation/verifications/verifyNone.ts index 1aeafd0..4c0a6cc 100644 --- a/packages/server/src/attestation/verifications/verifyNone.ts +++ b/packages/server/src/attestation/verifications/verifyNone.ts @@ -1,5 +1,5 @@ import base64url from 'base64url'; -import { AttestationObject, VerifiedAttestation } from '@webauthntine/typescript-types'; +import { AttestationObject, VerifiedAttestation } from '@simplewebauthn/typescript-types'; import convertCOSEtoPKCS from '@helpers/convertCOSEtoPKCS'; import parseAuthenticatorData from '@helpers/parseAuthenticatorData'; diff --git a/packages/server/src/attestation/verifications/verifyPacked.ts b/packages/server/src/attestation/verifications/verifyPacked.ts index 1fce442..1d7145b 100644 --- a/packages/server/src/attestation/verifications/verifyPacked.ts +++ b/packages/server/src/attestation/verifications/verifyPacked.ts @@ -7,7 +7,7 @@ import { VerifiedAttestation, COSEKEYS, COSEPublicKey as COSEPublicKeyType, -} from '@webauthntine/typescript-types'; +} from '@simplewebauthn/typescript-types'; import convertCOSEtoPKCS from '@helpers/convertCOSEtoPKCS'; import toHash from '@helpers/toHash'; diff --git a/packages/server/src/attestation/verifyAttestationResponse.ts b/packages/server/src/attestation/verifyAttestationResponse.ts index bd197ed..c531178 100644 --- a/packages/server/src/attestation/verifyAttestationResponse.ts +++ b/packages/server/src/attestation/verifyAttestationResponse.ts @@ -4,7 +4,7 @@ import { ATTESTATION_FORMATS, AuthenticatorAttestationResponseJSON, VerifiedAttestation, -} from '@webauthntine/typescript-types'; +} from '@simplewebauthn/typescript-types'; import verifyFIDOU2F from './verifications/verifyFIDOU2F'; import verifyPacked from './verifications/verifyPacked'; diff --git a/packages/server/src/helpers/convertCOSEtoPKCS.test.ts b/packages/server/src/helpers/convertCOSEtoPKCS.test.ts index 5bc970c..d17d4bd 100644 --- a/packages/server/src/helpers/convertCOSEtoPKCS.test.ts +++ b/packages/server/src/helpers/convertCOSEtoPKCS.test.ts @@ -1,5 +1,5 @@ import cbor from 'cbor'; -import { COSEKEYS } from '@webauthntine/typescript-types'; +import { COSEKEYS } from '@simplewebauthn/typescript-types'; import convertCOSEtoPKCS from './convertCOSEtoPKCS'; diff --git a/packages/server/src/helpers/convertCOSEtoPKCS.ts b/packages/server/src/helpers/convertCOSEtoPKCS.ts index d07b8a4..5b03b1a 100644 --- a/packages/server/src/helpers/convertCOSEtoPKCS.ts +++ b/packages/server/src/helpers/convertCOSEtoPKCS.ts @@ -1,5 +1,5 @@ import cbor from 'cbor'; -import { COSEKEYS, COSEPublicKey } from '@webauthntine/typescript-types'; +import { COSEKEYS, COSEPublicKey } from '@simplewebauthn/typescript-types'; /** * Takes COSE-encoded public key and converts it to PKCS key diff --git a/packages/server/src/helpers/decodeAttestationObject.ts b/packages/server/src/helpers/decodeAttestationObject.ts index 509c129..3e66e67 100644 --- a/packages/server/src/helpers/decodeAttestationObject.ts +++ b/packages/server/src/helpers/decodeAttestationObject.ts @@ -1,6 +1,6 @@ import base64url from 'base64url'; import cbor from 'cbor'; -import { AttestationObject } from '@webauthntine/typescript-types'; +import { AttestationObject } from '@simplewebauthn/typescript-types'; /** * Convert an AttestationObject from base64 string to a proper object diff --git a/packages/server/src/helpers/decodeClientDataJSON.ts b/packages/server/src/helpers/decodeClientDataJSON.ts index 0ff5dea..fb909cf 100644 --- a/packages/server/src/helpers/decodeClientDataJSON.ts +++ b/packages/server/src/helpers/decodeClientDataJSON.ts @@ -1,4 +1,4 @@ -import { ClientDataJSON } from '@webauthntine/typescript-types'; +import { ClientDataJSON } from '@simplewebauthn/typescript-types'; import asciiToBinary from './asciiToBinary'; diff --git a/packages/server/src/helpers/getCertificateInfo.ts b/packages/server/src/helpers/getCertificateInfo.ts index 68f9c20..b6d8e26 100644 --- a/packages/server/src/helpers/getCertificateInfo.ts +++ b/packages/server/src/helpers/getCertificateInfo.ts @@ -1,5 +1,5 @@ import jsrsasign from 'jsrsasign'; -import { CertificateInfo } from '@webauthntine/typescript-types'; +import { CertificateInfo } from '@simplewebauthn/typescript-types'; type ExtInfo = { critical: boolean; diff --git a/packages/server/src/helpers/parseAuthenticatorData.ts b/packages/server/src/helpers/parseAuthenticatorData.ts index 969e9ec..62c1cb1 100644 --- a/packages/server/src/helpers/parseAuthenticatorData.ts +++ b/packages/server/src/helpers/parseAuthenticatorData.ts @@ -1,4 +1,4 @@ -import { ParsedAuthenticatorData } from '@webauthntine/typescript-types'; +import { ParsedAuthenticatorData } from '@simplewebauthn/typescript-types'; /** * Make sense of the authData buffer contained in an Attestation |