{ "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/extended/schema.ts", "../../src/dev/inspector/inspector.css.ts", "../../src/dev/inspector/inspector.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", "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", "export const inspectorCSS = `:host {\n position: absolute;\n top: 2em;\n left: 2em;\n right: 2em;\n bottom: 2em;\n box-sizing: border-box;\n font-family: sans-serif;\n box-shadow: 0 0 1em 2em rgba(0, 0, 0, 0.2);\n overflow: hidden;\n resize: both;\n\n background: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(0.5em);\n -webkit-backdrop-filter: blur(4px);\n z-index: 1000000;\n}\n\n.wrapper {\n width: 100%;\n height: 100%;\n padding: 1em;\n box-sizing: border-box;\n display: grid;\n grid-template-rows: auto auto 1fr;\n}\n\n.header {\n text-align: center;\n}\n\ntextarea {\n width: 100%;\n height: 100%;\n background: rgba(255, 255, 255, 0.8);\n}\n\n.success textarea {\n background: rgba(0, 255, 0, 0.5);\n}\n\n.failure textarea {\n background: rgba(255, 0, 0, 0.25);\n}\n\n.controls {\n text-align: center;\n align-items: center;\n margin: 0.5em;\n gap: 0.5em;\n}\n\nbutton {\n margin-right: 0.5em;\n}\n`;\n", "import { bufferToBase64url } from \"../../webauthn-json/base64url\";\nimport {\n createRequestFromJSON,\n createResponseToJSON,\n getRequestFromJSON,\n getResponseToJSON,\n} from \"../../webauthn-json/basic/api\";\nimport {\n credentialCreationOptionsExtended,\n credentialRequestOptionsExtended,\n} from \"../../webauthn-json/extended/schema\";\n\nimport { inspectorCSS } from \"./inspector.css\";\nimport { convert } from \"../../webauthn-json/convert\";\n\nconst originalCreate = navigator.credentials?.create.bind(\n navigator.credentials,\n);\n\nconst originalGet = navigator.credentials?.get.bind(navigator.credentials);\n\nif (!navigator.credentials) {\n (navigator as any).credentials = {};\n}\n\nexport class WebAuthnInspector extends HTMLElement {\n shadow: ShadowRoot;\n contentWrapper: HTMLDivElement;\n header: HTMLDivElement;\n textareaWrapper: HTMLDivElement;\n textarea: HTMLTextAreaElement;\n controls: HTMLDivElement;\n closeButton: HTMLButtonElement;\n opButton: HTMLButtonElement;\n close: () => void;\n constructor() {\n super();\n this.shadow = this.attachShadow({ mode: \"closed\" });\n\n const cssElem: HTMLStyleElement = document.createElement(\"style\");\n cssElem.textContent = inspectorCSS;\n this.shadow.appendChild(cssElem);\n\n this.contentWrapper = document.createElement(\"div\");\n this.contentWrapper.classList.add(\"wrapper\");\n this.shadow.appendChild(this.contentWrapper);\n\n this.header = document.createElement(\"div\");\n this.header.textContent = \"WebAuthn Request\";\n this.header.classList.add(\"header\");\n this.contentWrapper.appendChild(this.header);\n\n this.controls = document.createElement(\"div\");\n this.controls.classList.add(\"controls\");\n this.contentWrapper.appendChild(this.controls);\n\n this.textareaWrapper = document.createElement(\"div\");\n this.textareaWrapper.classList.add(\"textarea-wrapper\");\n this.contentWrapper.appendChild(this.textareaWrapper);\n\n this.textarea = document.createElement(\"textarea\");\n this.textareaWrapper.appendChild(this.textarea);\n\n this.closeButton = document.createElement(\"button\");\n this.closeButton.textContent = \"Close\";\n this.closeButton.addEventListener(\"click\", () => {\n document.body.removeChild(this);\n if (this.close) {\n this.close();\n }\n });\n this.controls.appendChild(this.closeButton);\n\n const copyButton = document.createElement(\"button\");\n copyButton.textContent = \"Copy JSON\";\n copyButton.addEventListener(\"click\", () => {\n navigator.clipboard.writeText(this.textarea.value);\n copyButton.textContent = \"Copied!\";\n setTimeout(() => {\n copyButton.textContent = \"Copy JSON\";\n }, 1000);\n });\n this.controls.appendChild(copyButton);\n\n document.body.appendChild(this);\n }\n\n async create(\n options?: CredentialCreationOptions,\n ): Promise {\n return new Promise((resolve, reject) => {\n this.close = () => {\n reject(\"WebAuthn inspector closed\");\n };\n const json = convert(\n bufferToBase64url,\n credentialCreationOptionsExtended,\n options,\n );\n this.header.textContent = \"WebAuthn Create Request\";\n this.textarea.value = JSON.stringify(json, null, \" \");\n this.opButton = document.createElement(\"button\");\n this.opButton.textContent = \"Create\";\n this.opButton.addEventListener(\"click\", async () => {\n try {\n const requestJSON = JSON.parse(this.textarea.value!);\n const request = createRequestFromJSON(requestJSON);\n const response = await originalCreate(request);\n this.success(\"Create\", createResponseToJSON(response));\n this.closeButton.textContent = \"Respond\";\n this.close = () => {\n resolve(response);\n };\n } catch (e) {\n this.failure(\"Create\", e);\n this.close = () => {\n reject(e);\n };\n }\n });\n this.controls.appendChild(this.opButton);\n });\n }\n\n async get(options?: CredentialCreationOptions): Promise {\n return new Promise((resolve, reject) => {\n this.close = () => {\n reject(\"WebAuthn inspector closed\");\n };\n const json = convert(\n bufferToBase64url,\n credentialRequestOptionsExtended,\n options,\n );\n this.header.textContent = \"WebAuthn Get Request\";\n this.textarea.value = JSON.stringify(json, null, \" \");\n this.opButton = document.createElement(\"button\");\n this.opButton.textContent = \"Get\";\n this.opButton.addEventListener(\"click\", async () => {\n try {\n const requestJSON = JSON.parse(this.textarea.value!);\n const request = getRequestFromJSON(requestJSON);\n console.log(request);\n const response = await originalGet(request);\n this.success(\"Get\", getResponseToJSON(response));\n this.closeButton.textContent = \"Respond\";\n this.close = () => {\n resolve(response);\n };\n } catch (e) {\n this.failure(\"Get\", e);\n this.close = () => {\n reject(e);\n };\n }\n });\n this.controls.appendChild(this.opButton);\n });\n }\n\n success(op: string, responseJSON: any): void {\n this.controls.removeChild(this.opButton);\n this.header.textContent = `\u2705 WebAuthn ${op} Response`;\n this.contentWrapper.classList.add(\"success\");\n this.textarea.value = JSON.stringify(responseJSON, null, \" \");\n }\n\n failure(op: string, e: Error): void {\n this.controls.removeChild(this.opButton);\n this.header.textContent = `\u274C WebAuthn ${op} Response`;\n this.contentWrapper.classList.add(\"failure\");\n this.textarea.value = e.toString();\n }\n}\n\ncustomElements.define(\"webauthn-inspector\", WebAuthnInspector);\n\nnavigator.credentials.create = async function (\n options?: CredentialCreationOptions,\n): Promise {\n console.log(options);\n const interceptor = new WebAuthnInspector();\n return await interceptor.create(options);\n};\n\nnavigator.credentials.get = async function (\n options?: CredentialCreationOptions,\n): Promise {\n const interceptor = new WebAuthnInspector();\n return await interceptor.get(options);\n};\n\nconsole.log(\"WebAuthn Inspector is active!\");\n"], "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAEO,WAAS,kBACd,iBACa;AAEb,UAAM,UAAU,KAAK,MAAM,IAAI,IAAK,gBAAgB,SAAS,KAAM,CAAC;AACpE,UAAM,eACJ,gBAAgB,QAAQ,MAAM,GAAG,EAAE,QAAQ,MAAM,GAAG,IAAI;AAG1D,UAAM,MAAM,KAAK,YAAY;AAG7B,UAAM,SAAS,IAAI,YAAY,IAAI,MAAM;AACzC,UAAM,WAAW,IAAI,WAAW,MAAM;AACtC,aAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACnC,eAAS,KAAK,IAAI,WAAW,CAAC;AAAA,IAChC;AACA,WAAO;AAAA,EACT;AAEO,WAAS,kBAAkB,QAAsC;AAEtE,UAAM,WAAW,IAAI,WAAW,MAAM;AACtC,QAAI,MAAM;AACV,eAAW,YAAY,UAAU;AAC/B,aAAO,OAAO,aAAa,QAAQ;AAAA,IACrC;AAGA,UAAM,eAAe,KAAK,GAAG;AAI7B,UAAM,kBAAkB,aAAa,QAAQ,OAAO,GAAG,EAAE;AAAA,MACvD;AAAA,MACA;AA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