From 6fa3eb462d25b498c424fad79868dab959d18267 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Jan 2022 13:01:26 +0000 Subject: [PATCH 01/14] Bump spotless-plugin-gradle from 6.0.4 to 6.1.2 Bumps [spotless-plugin-gradle](https://github.com/diffplug/spotless) from 6.0.4 to 6.1.2. - [Release notes](https://github.com/diffplug/spotless/releases) - [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md) - [Commits](https://github.com/diffplug/spotless/compare/gradle/6.0.4...gradle/6.1.2) --- updated-dependencies: - dependency-name: com.diffplug.spotless:spotless-plugin-gradle dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 3bd0c4a60..b3c660a43 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ buildscript { } dependencies { classpath 'com.cinnober.gradle:semver-git:2.5.0' - classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.0.4' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.1.2' classpath 'io.github.cosmicsilence:gradle-scalafix:0.1.8' } } From b5a9fe389a72f8f1ff1a38d6991f857009fc2e14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Jan 2022 13:01:31 +0000 Subject: [PATCH 02/14] Bump spotless-plugin-gradle from 6.1.2 to 6.2.0 Bumps [spotless-plugin-gradle](https://github.com/diffplug/spotless) from 6.1.2 to 6.2.0. - [Release notes](https://github.com/diffplug/spotless/releases) - [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md) - [Commits](https://github.com/diffplug/spotless/compare/gradle/6.1.2...gradle/6.2.0) --- updated-dependencies: - dependency-name: com.diffplug.spotless:spotless-plugin-gradle dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index b3c660a43..ca917b032 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ buildscript { } dependencies { classpath 'com.cinnober.gradle:semver-git:2.5.0' - classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.1.2' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.2.0' classpath 'io.github.cosmicsilence:gradle-scalafix:0.1.8' } } From ba4f99927522c486c520c52064e04a4bef62d3a2 Mon Sep 17 00:00:00 2001 From: Emil Lundberg Date: Thu, 13 Jan 2022 18:16:39 +0100 Subject: [PATCH 03/14] Fix syntax errors trying to define and use named parameters --- .../src/main/webapp/index.html | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/webauthn-server-demo/src/main/webapp/index.html b/webauthn-server-demo/src/main/webapp/index.html index 5dd90ece8..da0af2435 100644 --- a/webauthn-server-demo/src/main/webapp/index.html +++ b/webauthn-server-demo/src/main/webapp/index.html @@ -182,7 +182,7 @@ ; } -function getRegisterRequest(urls, username, displayName, credentialNickname, requireResidentKey = false) { +function getRegisterRequest(urls, username, displayName, credentialNickname, requireResidentKey) { return fetch(urls.register, { body: new URLSearchParams({ username, @@ -199,7 +199,7 @@ ; } -function executeRegisterRequest(request, useU2f = false) { +function executeRegisterRequest(request, useU2f) { console.log('executeRegisterRequest', request); if (useU2f) { @@ -361,10 +361,10 @@ }); } -function registerResidentKey() { - return register(requireResidentKey = true); +function registerResidentKey(event) { + return register(event, true); } -function register(requireResidentKey = false, getRequest = getRegisterRequest) { +function register(event, requireResidentKey) { const username = document.getElementById('username').value; const displayName = document.getElementById('displayName').value; const credentialNickname = document.getElementById('credentialNickname').value; @@ -374,7 +374,7 @@ return performCeremony({ getIndexActions, - getRequest: urls => getRequest(urls, username, displayName, credentialNickname, requireResidentKey), + getRequest: urls => getRegisterRequest(urls, username, displayName, credentialNickname, requireResidentKey), statusStrings: { init: 'Initiating registration ceremony with server...', authenticatorRequest: 'Asking authenticators to create credential...', @@ -446,13 +446,13 @@ return webauthn.getAssertion(request.publicKeyCredentialRequestOptions); } -function authenticateWithUsername() { - return authenticate(username = document.getElementById('username').value); +function authenticateWithUsername(event) { + return authenticate(event, document.getElementById('username').value); } -function authenticate(username = null, getRequest = getAuthenticateRequest) { +function authenticate(event, username) { return performCeremony({ getIndexActions, - getRequest: urls => getRequest(urls, username), + getRequest: urls => getAuthenticateRequest(urls, username), statusStrings: { init: 'Initiating authentication ceremony with server...', authenticatorRequest: 'Asking authenticators to perform assertion...', From 4f6f872d8d10b5730a99dad79f7e3a304c808924 Mon Sep 17 00:00:00 2001 From: Emil Lundberg Date: Thu, 13 Jan 2022 18:15:38 +0100 Subject: [PATCH 04/14] Add webauthn-json library --- .../webapp/lib/webauthn-json-0.6.1/LICENSE.md | 22 ++ .../dist/esm/webauthn-json.js | 189 ++++++++++++++++++ .../dist/esm/webauthn-json.js.map | 7 + 3 files changed, 218 insertions(+) create mode 100644 webauthn-server-demo/src/main/webapp/lib/webauthn-json-0.6.1/LICENSE.md create mode 100644 webauthn-server-demo/src/main/webapp/lib/webauthn-json-0.6.1/dist/esm/webauthn-json.js create mode 100644 webauthn-server-demo/src/main/webapp/lib/webauthn-json-0.6.1/dist/esm/webauthn-json.js.map diff --git a/webauthn-server-demo/src/main/webapp/lib/webauthn-json-0.6.1/LICENSE.md b/webauthn-server-demo/src/main/webapp/lib/webauthn-json-0.6.1/LICENSE.md new file mode 100644 index 000000000..bfc6c46ef --- /dev/null +++ b/webauthn-server-demo/src/main/webapp/lib/webauthn-json-0.6.1/LICENSE.md @@ -0,0 +1,22 @@ +Copyright (c) 2019 GitHub, Inc. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/webauthn-server-demo/src/main/webapp/lib/webauthn-json-0.6.1/dist/esm/webauthn-json.js b/webauthn-server-demo/src/main/webapp/lib/webauthn-json-0.6.1/dist/esm/webauthn-json.js new file mode 100644 index 000000000..d6ef38b2b --- /dev/null +++ b/webauthn-server-demo/src/main/webapp/lib/webauthn-json-0.6.1/dist/esm/webauthn-json.js @@ -0,0 +1,189 @@ +// src/webauthn-json/base64url.ts +function base64urlToBuffer(baseurl64String) { + const padding = "==".slice(0, (4 - baseurl64String.length % 4) % 4); + const base64String = baseurl64String.replace(/-/g, "+").replace(/_/g, "/") + padding; + const str = atob(base64String); + const buffer = new ArrayBuffer(str.length); + const byteView = new Uint8Array(buffer); + for (let i = 0; i < str.length; i++) { + byteView[i] = str.charCodeAt(i); + } + return buffer; +} +function bufferToBase64url(buffer) { + const byteView = new Uint8Array(buffer); + let str = ""; + for (const charCode of byteView) { + str += String.fromCharCode(charCode); + } + const base64String = btoa(str); + const base64urlString = base64String.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); + return base64urlString; +} + +// src/webauthn-json/convert.ts +var copyValue = "copy"; +var convertValue = "convert"; +function convert(conversionFn, schema2, input) { + if (schema2 === copyValue) { + return input; + } + if (schema2 === convertValue) { + return conversionFn(input); + } + if (schema2 instanceof Array) { + return input.map((v) => convert(conversionFn, schema2[0], v)); + } + if (schema2 instanceof Object) { + const output = {}; + for (const [key, schemaField] of Object.entries(schema2)) { + if (schemaField.deriveFn) { + const v = schemaField.deriveFn(input); + if (v !== void 0) { + input[key] = v; + } + } + if (!(key in input)) { + if (schemaField.required) { + throw new Error(`Missing key: ${key}`); + } + continue; + } + if (input[key] == null) { + output[key] = null; + continue; + } + output[key] = convert(conversionFn, schemaField.schema, input[key]); + } + return output; + } +} +function derived(schema2, deriveFn) { + return { + required: true, + schema: schema2, + deriveFn + }; +} +function required(schema2) { + return { + required: true, + schema: schema2 + }; +} +function optional(schema2) { + return { + required: false, + schema: schema2 + }; +} + +// src/webauthn-json/basic/schema.ts +var publicKeyCredentialDescriptorSchema = { + type: required(copyValue), + id: required(convertValue), + transports: optional(copyValue) +}; +var simplifiedExtensionsSchema = { + appid: optional(copyValue), + appidExclude: optional(copyValue), + credProps: optional(copyValue) +}; +var simplifiedClientExtensionResultsSchema = { + appid: optional(copyValue), + appidExclude: optional(copyValue), + credProps: optional(copyValue) +}; +var credentialCreationOptions = { + publicKey: required({ + rp: required(copyValue), + user: required({ + id: required(convertValue), + name: required(copyValue), + displayName: required(copyValue) + }), + challenge: required(convertValue), + pubKeyCredParams: required(copyValue), + timeout: optional(copyValue), + excludeCredentials: optional([publicKeyCredentialDescriptorSchema]), + authenticatorSelection: optional(copyValue), + attestation: optional(copyValue), + extensions: optional(simplifiedExtensionsSchema) + }), + signal: optional(copyValue) +}; +var publicKeyCredentialWithAttestation = { + type: required(copyValue), + id: required(copyValue), + rawId: required(convertValue), + response: required({ + clientDataJSON: required(convertValue), + attestationObject: required(convertValue), + transports: derived(copyValue, (response) => response.getTransports?.() || []) + }), + clientExtensionResults: derived(simplifiedClientExtensionResultsSchema, (pkc) => pkc.getClientExtensionResults()) +}; +var credentialRequestOptions = { + mediation: optional(copyValue), + publicKey: required({ + challenge: required(convertValue), + timeout: optional(copyValue), + rpId: optional(copyValue), + allowCredentials: optional([publicKeyCredentialDescriptorSchema]), + userVerification: optional(copyValue), + extensions: optional(simplifiedExtensionsSchema) + }), + signal: optional(copyValue) +}; +var publicKeyCredentialWithAssertion = { + type: required(copyValue), + id: required(copyValue), + rawId: required(convertValue), + response: required({ + clientDataJSON: required(convertValue), + authenticatorData: required(convertValue), + signature: required(convertValue), + userHandle: required(convertValue) + }), + clientExtensionResults: derived(simplifiedClientExtensionResultsSchema, (pkc) => pkc.getClientExtensionResults()) +}; +var schema = { + credentialCreationOptions, + publicKeyCredentialWithAttestation, + credentialRequestOptions, + publicKeyCredentialWithAssertion +}; + +// src/webauthn-json/basic/api.ts +function createRequestFromJSON(requestJSON) { + return convert(base64urlToBuffer, credentialCreationOptions, requestJSON); +} +function createResponseToJSON(credential) { + return convert(bufferToBase64url, publicKeyCredentialWithAttestation, credential); +} +async function create(requestJSON) { + const credential = await navigator.credentials.create(createRequestFromJSON(requestJSON)); + return createResponseToJSON(credential); +} +function getRequestFromJSON(requestJSON) { + return convert(base64urlToBuffer, credentialRequestOptions, requestJSON); +} +function getResponseToJSON(credential) { + return convert(bufferToBase64url, publicKeyCredentialWithAssertion, credential); +} +async function get(requestJSON) { + const credential = await navigator.credentials.get(getRequestFromJSON(requestJSON)); + return getResponseToJSON(credential); +} + +// src/webauthn-json/basic/supported.ts +function supported() { + return !!(navigator.credentials && navigator.credentials.create && navigator.credentials.get && window.PublicKeyCredential); +} +export { + create, + get, + schema, + supported +}; +//# sourceMappingURL=webauthn-json.js.map diff --git a/webauthn-server-demo/src/main/webapp/lib/webauthn-json-0.6.1/dist/esm/webauthn-json.js.map b/webauthn-server-demo/src/main/webapp/lib/webauthn-json-0.6.1/dist/esm/webauthn-json.js.map new file mode 100644 index 000000000..9d6aa22ef --- /dev/null +++ b/webauthn-server-demo/src/main/webapp/lib/webauthn-json-0.6.1/dist/esm/webauthn-json.js.map @@ -0,0 +1,7 @@ +{ + "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"], + "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\n .replace(/\\+/g, \"-\")\n .replace(/\\//g, \"_\")\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.deriveFn) {\n const v = schemaField.deriveFn(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 deriveFn: (v: any) => any,\n): SchemaProperty {\n return {\n required: true,\n schema,\n deriveFn,\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 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 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 return !!(\n navigator.credentials &&\n navigator.credentials.create &&\n navigator.credentials.get &&\n window.PublicKeyCredential\n );\n}\n"], + "mappings": ";AAEO,2BACL,iBACa;AAEb,QAAM,UAAU,KAAK,MAAM,GAAI,KAAK,gBAAgB,SAAS,KAAM;AACnE,QAAM,eACJ,gBAAgB,QAAQ,MAAM,KAAK,QAAQ,MAAM,OAAO;AAG1D,QAAM,MAAM,KAAK;AAGjB,QAAM,SAAS,IAAI,YAAY,IAAI;AACnC,QAAM,WAAW,IAAI,WAAW;AAChC,WAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACnC,aAAS,KAAK,IAAI,WAAW;AAAA;AAE/B,SAAO;AAAA;AAGF,2BAA2B,QAAsC;AAEtE,QAAM,WAAW,IAAI,WAAW;AAChC,MAAI,MAAM;AACV,aAAW,YAAY,UAAU;AAC/B,WAAO,OAAO,aAAa;AAAA;AAI7B,QAAM,eAAe,KAAK;AAI1B,QAAM,kBAAkB,aACrB,QAAQ,OAAO,KACf,QAAQ,OAAO,KACf,QAAQ,MAAM;AACjB,SAAO;AAAA;;;ACjCF,IAA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,IAAM,SAAkC;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;;;AC9FK,+BACL,aAC2B;AAC3B,SAAO,QAAQ,mBAAmB,2BAA2B;AAAA;AAGxD,8BACL,YACwC;AACxC,SAAO,QACL,mBACA,oCACA;AAAA;AAIJ,sBACE,aACiD;AACjD,QAAM,aAAc,MAAM,UAAU,YAAY,OAC9C,sBAAsB;AAExB,SAAO,qBAAqB;AAAA;AAGvB,4BACL,aAC0B;AAC1B,SAAO,QAAQ,mBAAmB,0BAA0B;AAAA;AAGvD,2BACL,YACsC;AACtC,SAAO,QACL,mBACA,kCACA;AAAA;AAIJ,mBACE,aAC+C;AAC/C,QAAM,aAAc,MAAM,UAAU,YAAY,IAC9C,mBAAmB;AAErB,SAAO,kBAAkB;AAAA;;;ACzDpB,qBAA8B;AACnC,SAAO,CAAC,CACN,WAAU,eACV,UAAU,YAAY,UACtB,UAAU,YAAY,OACtB,OAAO;AAAA;", + "names": [] +} From 6508e29490c5ffff1cc9bf13011061ca2bc8a30b Mon Sep 17 00:00:00 2001 From: Emil Lundberg Date: Thu, 13 Jan 2022 18:22:26 +0100 Subject: [PATCH 05/14] Use webauthn-json library in demo --- .../src/main/webapp/index.html | 34 ++-- .../src/main/webapp/js/webauthn.js | 172 ------------------ 2 files changed, 21 insertions(+), 185 deletions(-) delete mode 100644 webauthn-server-demo/src/main/webapp/js/webauthn.js diff --git a/webauthn-server-demo/src/main/webapp/index.html b/webauthn-server-demo/src/main/webapp/index.html index da0af2435..30379ac80 100644 --- a/webauthn-server-demo/src/main/webapp/index.html +++ b/webauthn-server-demo/src/main/webapp/index.html @@ -55,9 +55,9 @@ - -