{ "version": 3, "sources": ["../../src/webauthn-json/base64url.ts", "../../src/webauthn-json/convert.ts", "../../src/webauthn-json/basic/schema.ts", "../../src/webauthn-json/basic/api.ts", "../../src/webauthn-json/basic/supported.ts", "../../src/webauthn-json/extended/schema.ts", "../../src/webauthn-json/extended/api.ts"], "sourcesContent": ["export type Base64urlString = string;\n\nexport function base64urlToBuffer(\n baseurl64String: Base64urlString,\n): ArrayBuffer {\n // Base64url to Base64\n const padding = \"==\".slice(0, (4 - (baseurl64String.length % 4)) % 4);\n const base64String =\n baseurl64String.replace(/-/g, \"+\").replace(/_/g, \"/\") + padding;\n\n // Base64 to binary string\n const str = atob(base64String);\n\n // Binary string to buffer\n const buffer = new ArrayBuffer(str.length);\n const byteView = new Uint8Array(buffer);\n for (let i = 0; i < str.length; i++) {\n byteView[i] = str.charCodeAt(i);\n }\n return buffer;\n}\n\nexport function bufferToBase64url(buffer: ArrayBuffer): Base64urlString {\n // Buffer to binary string\n const byteView = new Uint8Array(buffer);\n let str = \"\";\n for (const charCode of byteView) {\n str += String.fromCharCode(charCode);\n }\n\n // Binary string to base64\n const base64String = btoa(str);\n\n // Base64 to base64url\n // We assume that the base64url string is well-formed.\n const base64urlString = base64String.replace(/\\+/g, \"-\").replace(\n /\\//g,\n \"_\",\n ).replace(/=/g, \"\");\n return base64urlString;\n}\n", "// We export these values in order so that they can be used to deduplicate\n// schema definitions in minified JS code.\n\nimport { Schema, SchemaProperty } from \"./schema-format\";\n\n// TODO: Parcel isn't deduplicating these values.\nexport const copyValue = \"copy\";\nexport const convertValue = \"convert\";\n\nexport function convert(\n conversionFn: (v: From) => To,\n schema: Schema,\n input: any,\n): any {\n if (schema === copyValue) {\n return input;\n }\n if (schema === convertValue) {\n return conversionFn(input);\n }\n if (schema instanceof Array) {\n return input.map((v: any) => convert(conversionFn, schema[0], v));\n }\n if (schema instanceof Object) {\n const output: any = {};\n for (const [key, schemaField] of Object.entries(schema)) {\n if (schemaField.derive) {\n const v = schemaField.derive(input);\n if (v !== undefined) {\n input[key] = v;\n }\n }\n\n if (!(key in input)) {\n if (schemaField.required) {\n throw new Error(`Missing key: ${key}`);\n }\n continue;\n }\n // Fields can be null (rather than missing or `undefined`), e.g. the\n // `userHandle` field of the `AuthenticatorAssertionResponse`:\n // https://www.w3.org/TR/webauthn/#iface-authenticatorassertionresponse\n if (input[key] == null) {\n output[key] = null;\n continue;\n }\n output[key] = convert(\n conversionFn,\n schemaField.schema,\n input[key],\n );\n }\n return output;\n }\n}\n\nexport function derived(\n schema: Schema,\n derive: (v: any) => any,\n): SchemaProperty {\n return {\n required: true,\n schema,\n derive,\n };\n}\n\nexport function required(schema: Schema): SchemaProperty {\n return {\n required: true,\n schema,\n };\n}\n\nexport function optional(schema: Schema): SchemaProperty {\n return {\n required: false,\n schema,\n };\n}\n", "import { Schema } from \"../schema-format\";\nimport {\n convertValue as convert,\n copyValue as copy,\n derived,\n optional,\n required,\n} from \"../convert\";\n\n// Shared by `create()` and `get()`.\n\nconst publicKeyCredentialDescriptorSchema: Schema = {\n type: required(copy),\n id: required(convert),\n transports: optional(copy),\n};\n\nconst simplifiedExtensionsSchema: Schema = {\n appid: optional(copy),\n appidExclude: optional(copy),\n credProps: optional(copy),\n};\n\nconst simplifiedClientExtensionResultsSchema = {\n appid: optional(copy),\n appidExclude: optional(copy),\n credProps: optional(copy),\n};\n\n// `navigator.create()` request\n\nexport const credentialCreationOptions: Schema = {\n publicKey: required({\n rp: required(copy),\n user: required({\n id: required(convert),\n name: required(copy),\n displayName: required(copy),\n }),\n\n challenge: required(convert),\n pubKeyCredParams: required(copy),\n\n timeout: optional(copy),\n excludeCredentials: optional([publicKeyCredentialDescriptorSchema]),\n authenticatorSelection: optional(copy),\n attestation: optional(copy),\n extensions: optional(simplifiedExtensionsSchema),\n }),\n signal: optional(copy),\n};\n\n// `navigator.create()` response\n\nexport const publicKeyCredentialWithAttestation: Schema = {\n type: required(copy),\n id: required(copy),\n rawId: required(convert),\n authenticatorAttachment: optional(copy),\n response: required({\n clientDataJSON: required(convert),\n attestationObject: required(convert),\n transports: derived(\n copy,\n (response: any) => response.getTransports?.() || [],\n ),\n }),\n clientExtensionResults: derived(\n simplifiedClientExtensionResultsSchema,\n (pkc: PublicKeyCredential) => pkc.getClientExtensionResults(),\n ),\n};\n\n// `navigator.get()` request\n\nexport const credentialRequestOptions: Schema = {\n mediation: optional(copy),\n publicKey: required({\n challenge: required(convert),\n timeout: optional(copy),\n rpId: optional(copy),\n allowCredentials: optional([publicKeyCredentialDescriptorSchema]),\n userVerification: optional(copy),\n extensions: optional(simplifiedExtensionsSchema),\n }),\n signal: optional(copy),\n};\n\n// `navigator.get()` response\n\nexport const publicKeyCredentialWithAssertion: Schema = {\n type: required(copy),\n id: required(copy),\n rawId: required(convert),\n authenticatorAttachment: optional(copy),\n response: required({\n clientDataJSON: required(convert),\n authenticatorData: required(convert),\n signature: required(convert),\n userHandle: required(convert),\n }),\n clientExtensionResults: derived(\n simplifiedClientExtensionResultsSchema,\n (pkc: PublicKeyCredential) => pkc.getClientExtensionResults(),\n ),\n};\n\nexport const schema: { [s: string]: Schema } = {\n credentialCreationOptions,\n publicKeyCredentialWithAttestation,\n credentialRequestOptions,\n publicKeyCredentialWithAssertion,\n};\n", "import { base64urlToBuffer, bufferToBase64url } from \"../base64url\";\nimport { convert } from \"../convert\";\nimport {\n CredentialCreationOptionsJSON,\n CredentialRequestOptionsJSON,\n PublicKeyCredentialWithAssertionJSON,\n PublicKeyCredentialWithAttestationJSON,\n} from \"./json\";\nimport {\n credentialCreationOptions,\n credentialRequestOptions,\n publicKeyCredentialWithAssertion,\n publicKeyCredentialWithAttestation,\n} from \"./schema\";\n\nexport function createRequestFromJSON(\n requestJSON: CredentialCreationOptionsJSON,\n): CredentialCreationOptions {\n return convert(base64urlToBuffer, credentialCreationOptions, requestJSON);\n}\n\nexport function createResponseToJSON(\n credential: PublicKeyCredential,\n): PublicKeyCredentialWithAttestationJSON {\n return convert(\n bufferToBase64url,\n publicKeyCredentialWithAttestation,\n credential,\n );\n}\n\nexport async function create(\n requestJSON: CredentialCreationOptionsJSON,\n): Promise {\n const credential = (await navigator.credentials.create(\n createRequestFromJSON(requestJSON),\n )) as PublicKeyCredential;\n return createResponseToJSON(credential);\n}\n\nexport function getRequestFromJSON(\n requestJSON: CredentialRequestOptionsJSON,\n): CredentialRequestOptions {\n return convert(base64urlToBuffer, credentialRequestOptions, requestJSON);\n}\n\nexport function getResponseToJSON(\n credential: PublicKeyCredential,\n): PublicKeyCredentialWithAssertionJSON {\n return convert(\n bufferToBase64url,\n publicKeyCredentialWithAssertion,\n credential,\n );\n}\n\nexport async function get(\n requestJSON: CredentialRequestOptionsJSON,\n): Promise {\n const credential = (await navigator.credentials.get(\n getRequestFromJSON(requestJSON),\n )) as PublicKeyCredential;\n return getResponseToJSON(credential);\n}\n\ndeclare global {\n interface Window {\n PublicKeyCredential: PublicKeyCredential | undefined;\n }\n}\n", "// This function does a simple check to test for the credential management API\n// functions we need, and an indication of public key credential authentication\n// support.\n// https://developers.google.com/web/updates/2018/03/webauthn-credential-management\n\nexport function supported(): boolean {\n // rome-ignore format: Work around https://github.com/rome/tools/issues/3734\n return !!(\n // rome-ignore lint(style/useOptionalChain): Optional chaining creates more complicated ES2019 code\n navigator.credentials &&\n navigator.credentials.create &&\n navigator.credentials.get &&\n window.PublicKeyCredential\n );\n}\n", "import {\n credentialCreationOptions,\n credentialRequestOptions,\n publicKeyCredentialWithAssertion,\n publicKeyCredentialWithAttestation,\n} from \"../basic/schema\";\nimport { convertValue, copyValue, derived, optional } from \"../convert\";\nimport { Schema } from \"../schema-format\";\n\n// shared\n\nconst authenticationExtensionsClientInputsSchema: Schema = {\n appid: optional(copyValue),\n appidExclude: optional(copyValue),\n uvm: optional(copyValue),\n credProps: optional(copyValue),\n largeBlob: optional({\n support: optional(copyValue),\n read: optional(copyValue),\n write: optional(convertValue),\n }),\n};\n\nconst authenticationExtensionsClientOutputsSchema: Schema = {\n appid: optional(copyValue),\n appidExclude: optional(copyValue),\n uvm: optional(copyValue),\n credProps: optional(copyValue),\n largeBlob: optional({\n supported: optional(copyValue),\n blob: optional(convertValue),\n written: optional(copyValue),\n }),\n};\n\n// create\n\nexport const credentialCreationOptionsExtended: Schema = JSON.parse(\n JSON.stringify(credentialCreationOptions),\n);\n(credentialCreationOptionsExtended as any).publicKey.schema.extensions =\n optional(authenticationExtensionsClientInputsSchema);\n\nexport const publicKeyCredentialWithAttestationExtended: Schema = JSON.parse(\n JSON.stringify(publicKeyCredentialWithAttestation),\n);\n(publicKeyCredentialWithAttestationExtended as any).clientExtensionResults =\n derived(\n authenticationExtensionsClientOutputsSchema,\n (publicKeyCredentialWithAttestation as any).clientExtensionResults.derive,\n );\n(publicKeyCredentialWithAttestationExtended as any).response.schema.transports =\n (publicKeyCredentialWithAttestation as any).response.schema.transports;\n// get\n\nexport const credentialRequestOptionsExtended: Schema = JSON.parse(\n JSON.stringify(credentialRequestOptions),\n);\n(credentialRequestOptionsExtended as any).publicKey.schema.extensions =\n optional(authenticationExtensionsClientInputsSchema);\n\nexport const publicKeyCredentialWithAssertionExtended: Schema = JSON.parse(\n JSON.stringify(publicKeyCredentialWithAssertion),\n);\n(publicKeyCredentialWithAssertionExtended as any).clientExtensionResults =\n derived(\n authenticationExtensionsClientOutputsSchema,\n (publicKeyCredentialWithAssertion as any).clientExtensionResults.derive,\n );\n", "import {\n base64urlToBuffer,\n bufferToBase64url,\n Base64urlString,\n} from \"../base64url\";\nimport { convert } from \"../convert\";\nimport {\n AuthenticatorAttestationResponseJSON,\n PublicKeyCredentialWithClientExtensionResults,\n} from \"../basic/json\";\nimport {\n CredentialCreationOptionsExtendedJSON,\n CredentialRequestOptionsExtendedJSON,\n PublicKeyCredentialWithAssertionExtendedResultsJSON,\n PublicKeyCredentialWithAttestationExtendedResultsJSON,\n AuthenticatorAttestationResponseExtendedJSONCallable,\n AuthenticatorAttestationResponseExtendedJSONCallablePartial,\n} from \"./json\";\nimport {\n credentialCreationOptionsExtended,\n credentialRequestOptionsExtended,\n publicKeyCredentialWithAssertionExtended,\n publicKeyCredentialWithAttestationExtended,\n} from \"./schema\";\n\n// create\n\nexport function createExtendedRequestFromJSON(\n requestJSON: CredentialCreationOptionsExtendedJSON,\n): CredentialCreationOptions {\n return convert(\n base64urlToBuffer,\n credentialCreationOptionsExtended,\n requestJSON,\n );\n}\n\nexport function createExtendedResponseToJSON(\n credential: PublicKeyCredentialWithClientExtensionResults,\n): PublicKeyCredentialWithAttestationExtendedResultsJSON {\n return convert(\n bufferToBase64url,\n publicKeyCredentialWithAttestationExtended,\n credential,\n );\n}\n\ninterface AuthenticatorAttestationResponseExtendedCallablePartial {\n getTransports?: () => string[];\n getAuthenticatorData?: () => ArrayBuffer;\n getPublicKey?: () => ArrayBuffer | null;\n getPublicKeyAlgorithm?: () => COSEAlgorithmIdentifier;\n}\n\nfunction makeCallable(\n jsonResponse: AuthenticatorAttestationResponseJSON,\n credentialResponse: AuthenticatorAttestationResponseExtendedCallablePartial,\n): AuthenticatorAttestationResponseExtendedJSONCallable {\n const callable: AuthenticatorAttestationResponseExtendedJSONCallablePartial =\n {};\n\n if (credentialResponse.getTransports) {\n callable.getTransports = (): string[] => {\n return credentialResponse.getTransports();\n };\n }\n\n if (credentialResponse.getAuthenticatorData) {\n callable.getAuthenticatorData = (): Base64urlString => {\n return bufferToBase64url(credentialResponse.getAuthenticatorData());\n };\n }\n\n if (credentialResponse.getPublicKey) {\n callable.getPublicKey = (): Base64urlString => {\n const publicKey = credentialResponse.getPublicKey();\n return publicKey && bufferToBase64url(publicKey);\n };\n }\n\n if (credentialResponse.getPublicKeyAlgorithm) {\n callable.getPublicKeyAlgorithm = (): COSEAlgorithmIdentifier => {\n return credentialResponse.getPublicKeyAlgorithm();\n };\n }\n\n const newJSON = Object.create(callable);\n Object.assign(newJSON, jsonResponse);\n return newJSON;\n}\n\nexport async function createExtended(\n requestJSON: CredentialCreationOptionsExtendedJSON,\n): Promise {\n const credential = (await navigator.credentials.create(\n createExtendedRequestFromJSON(requestJSON),\n )) as PublicKeyCredential;\n const json = createExtendedResponseToJSON(credential);\n json.response = makeCallable(\n json.response,\n credential.response as AuthenticatorAttestationResponseExtendedCallablePartial,\n );\n return json;\n}\n\n// get\n\nexport function getExtendedRequestFromJSON(\n requestJSON: CredentialRequestOptionsExtendedJSON,\n): CredentialRequestOptions {\n return convert(\n base64urlToBuffer,\n credentialRequestOptionsExtended,\n requestJSON,\n );\n}\n\nexport function getExtendedResponseToJSON(\n credential: PublicKeyCredentialWithClientExtensionResults,\n): PublicKeyCredentialWithAssertionExtendedResultsJSON {\n return convert(\n bufferToBase64url,\n publicKeyCredentialWithAssertionExtended,\n credential,\n );\n}\n\nexport async function getExtended(\n requestJSON: CredentialRequestOptionsExtendedJSON,\n): Promise {\n const credential = (await navigator.credentials.get(\n getExtendedRequestFromJSON(requestJSON),\n )) as PublicKeyCredential;\n return getExtendedResponseToJSON(credential);\n}\n"], "mappings": ";AAEO,SAAS,kBACd,iBACa;AAEb,QAAM,UAAU,KAAK,MAAM,IAAI,IAAK,gBAAgB,SAAS,KAAM,CAAC;AACpE,QAAM,eACJ,gBAAgB,QAAQ,MAAM,GAAG,EAAE,QAAQ,MAAM,GAAG,IAAI;AAG1D,QAAM,MAAM,KAAK,YAAY;AAG7B,QAAM,SAAS,IAAI,YAAY,IAAI,MAAM;AACzC,QAAM,WAAW,IAAI,WAAW,MAAM;AACtC,WAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACnC,aAAS,KAAK,IAAI,WAAW,CAAC;AAAA,EAChC;AACA,SAAO;AACT;AAEO,SAAS,kBAAkB,QAAsC;AAEtE,QAAM,WAAW,IAAI,WAAW,MAAM;AACtC,MAAI,MAAM;AACV,aAAW,YAAY,UAAU;AAC/B,WAAO,OAAO,aAAa,QAAQ;AAAA,EACrC;AAGA,QAAM,eAAe,KAAK,GAAG;AAI7B,QAAM,kBAAkB,aAAa,QAAQ,OAAO,GAAG,EAAE;AAAA,IACvD;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