@simplewebauthn/browser
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -1,3 +0,3 @@ | ||
// [@webauthentine/browser] Version: 2.0.0 - Friday, February 5th, 2021, 9:17:55 AM | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SimpleWebAuthnBrowser=t():e.SimpleWebAuthnBrowser=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,"="),o=atob(r),u=new ArrayBuffer(o.length),a=new Uint8Array(u);for(let e=0;e<o.length;e++)a[e]=o.charCodeAt(e);return u}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return void 0!==(null===window||void 0===window?void 0:window.PublicKeyCredential)&&"function"==typeof window.PublicKeyCredential}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=new Uint8Array(e);let n="";for(const e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(n(0));t.default=function(e){const{id:t}=e;return{...e,id:o.default(t)}}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.supportsWebauthn=t.startAssertion=t.startAttestation=void 0;const o=r(n(5));t.startAttestation=o.default;const u=r(n(7));t.startAssertion=u.default;const a=r(n(1));t.supportsWebauthn=a.default},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(n(6)),u=r(n(2)),a=r(n(0)),i=r(n(1)),l=r(n(3));t.default=async function(e){if(!i.default())throw new Error("WebAuthn is not supported in this browser");const t={...e,challenge:a.default(e.challenge),user:{...e.user,id:o.default(e.user.id)},excludeCredentials:e.excludeCredentials.map(l.default)},n=await navigator.credentials.create({publicKey:t});if(!n)throw new Error("Attestation was not completed");const{id:r,rawId:s,response:d,type:c}=n,f={id:r,rawId:u.default(s),response:{attestationObject:u.default(d.attestationObject),clientDataJSON:u.default(d.clientDataJSON)},type:c};return"function"==typeof d.getTransports&&(f.transports=d.getTransports()),f}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(new TextEncoder).encode(e)}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(n(2)),u=r(n(0)),a=r(n(1)),i=r(n(3));t.default=async function(e){var t,n;if(!a.default())throw new Error("WebAuthn is not supported in this browser");let r;0!==(null===(t=e.allowCredentials)||void 0===t?void 0:t.length)&&(r=null===(n=e.allowCredentials)||void 0===n?void 0:n.map(i.default));const l={...e,challenge:u.default(e.challenge),allowCredentials:r},s=await navigator.credentials.get({publicKey:l});if(!s)throw new Error("Assertion was not completed");const{id:d,rawId:c,response:f,type:p}=s;let b=void 0;return f.userHandle&&(b=o.default(f.userHandle)),{id:d,rawId:o.default(c),response:{authenticatorData:o.default(f.authenticatorData),clientDataJSON:o.default(f.clientDataJSON),signature:o.default(f.signature),userHandle:b},type:p}}}])})); | ||
/** [@simplewebauthn/browser] Version: 2.1.0 - Saturday, February 6th, 2021, 4:10:31 PM */ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SimpleWebAuthnBrowser=t():e.SimpleWebAuthnBrowser=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,"="),o=atob(r),u=new ArrayBuffer(o.length),i=new Uint8Array(u);for(let e=0;e<o.length;e++)i[e]=o.charCodeAt(e);return u}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return void 0!==(null===window||void 0===window?void 0:window.PublicKeyCredential)&&"function"==typeof window.PublicKeyCredential}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=new Uint8Array(e);let n="";for(const e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(n(0));t.default=function(e){const{id:t}=e;return{...e,id:o.default(t)}}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.supportsWebauthn=t.startAssertion=t.startAttestation=void 0;const o=r(n(5));t.startAttestation=o.default;const u=r(n(7));t.startAssertion=u.default;const i=r(n(1));t.supportsWebauthn=i.default},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(n(6)),u=r(n(2)),i=r(n(0)),a=r(n(1)),l=r(n(3));t.default=async function(e){if(!a.default())throw new Error("WebAuthn is not supported in this browser");const t={...e,challenge:i.default(e.challenge),user:{...e.user,id:o.default(e.user.id)},excludeCredentials:e.excludeCredentials.map(l.default)},n=await navigator.credentials.create({publicKey:t});if(!n)throw new Error("Attestation was not completed");const{id:r,rawId:s,response:d,type:c}=n,f={id:r,rawId:u.default(s),response:{attestationObject:u.default(d.attestationObject),clientDataJSON:u.default(d.clientDataJSON)},type:c,clientExtensionResults:n.getClientExtensionResults()};return"function"==typeof d.getTransports&&(f.transports=d.getTransports()),f}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(new TextEncoder).encode(e)}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(n(2)),u=r(n(0)),i=r(n(1)),a=r(n(3));t.default=async function(e){var t,n;if(!i.default())throw new Error("WebAuthn is not supported in this browser");let r;0!==(null===(t=e.allowCredentials)||void 0===t?void 0:t.length)&&(r=null===(n=e.allowCredentials)||void 0===n?void 0:n.map(a.default));const l={...e,challenge:u.default(e.challenge),allowCredentials:r},s=await navigator.credentials.get({publicKey:l});if(!s)throw new Error("Assertion was not completed");const{id:d,rawId:c,response:f,type:p}=s;let b=void 0;return f.userHandle&&(b=o.default(f.userHandle)),{id:d,rawId:o.default(c),response:{authenticatorData:o.default(f.authenticatorData),clientDataJSON:o.default(f.clientDataJSON),signature:o.default(f.signature),userHandle:b},type:p,clientExtensionResults:s.getClientExtensionResults()}}}])})); | ||
//# sourceMappingURL=simplewebauthn-browser.min.js.map |
{ | ||
"name": "@simplewebauthn/browser", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "SimpleWebAuthn for Browsers", | ||
@@ -32,3 +32,3 @@ "main": "dist/simplewebauthn-browser.min.js", | ||
"devDependencies": { | ||
"@simplewebauthn/typescript-types": "^2.0.0", | ||
"@simplewebauthn/typescript-types": "^2.1.0", | ||
"ts-loader": "^7.0.5", | ||
@@ -39,3 +39,3 @@ "webpack": "^4.44.0", | ||
}, | ||
"gitHead": "7ffbefc50b0f4009777c68b4cc338362bce29931" | ||
"gitHead": "369b9717c2f81dcfe06eb5088a9f16d2b2513e84" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27282
87