@edgedb/auth-core
Advanced tools
Comparing version 0.3.0-canary.20240709T173725 to 0.3.0-canary.20240716T173531
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.randomBytes = exports.sha256 = exports.base64UrlToBytes = exports.bytesToBase64Url = void 0; | ||
exports.bytesToBase64Url = bytesToBase64Url; | ||
exports.base64UrlToBytes = base64UrlToBytes; | ||
exports.sha256 = sha256; | ||
exports.randomBytes = randomBytes; | ||
const BASE64_URL_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; | ||
@@ -26,3 +29,2 @@ function bytesToBase64Url(bytes) { | ||
} | ||
exports.bytesToBase64Url = bytesToBase64Url; | ||
function base64UrlToBytes(base64url) { | ||
@@ -52,3 +54,2 @@ // Add padding if necessary | ||
} | ||
exports.base64UrlToBytes = base64UrlToBytes; | ||
async function sha256(source) { | ||
@@ -58,6 +59,4 @@ const bytes = typeof source === "string" ? new TextEncoder().encode(source) : source; | ||
} | ||
exports.sha256 = sha256; | ||
function randomBytes(length) { | ||
return crypto.getRandomValues(new Uint8Array(length)); | ||
} | ||
exports.randomBytes = randomBytes; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createVerifierChallengePair = void 0; | ||
exports.createVerifierChallengePair = createVerifierChallengePair; | ||
const crypto_1 = require("./crypto"); | ||
@@ -10,2 +10,1 @@ async function createVerifierChallengePair() { | ||
} | ||
exports.createVerifierChallengePair = createVerifierChallengePair; |
@@ -26,3 +26,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.decodeError = exports.errorMapping = exports.requestPOST = exports.requestGET = void 0; | ||
exports.errorMapping = void 0; | ||
exports.requestGET = requestGET; | ||
exports.requestPOST = requestPOST; | ||
exports.decodeError = decodeError; | ||
const errors = __importStar(require("./errors")); | ||
@@ -62,3 +65,2 @@ async function requestGET(href, searchParams, onFailure) { | ||
} | ||
exports.requestGET = requestGET; | ||
async function requestPOST(href, body, onFailure) { | ||
@@ -97,3 +99,2 @@ try { | ||
} | ||
exports.requestPOST = requestPOST; | ||
exports.errorMapping = new Map(Object.values(errors) | ||
@@ -126,2 +127,1 @@ .map((errClass) => "type" in errClass.prototype ? [errClass.prototype.type, errClass] : null) | ||
} | ||
exports.decodeError = decodeError; |
{ | ||
"name": "@edgedb/auth-core", | ||
"description": "Core helper library for the EdgeDB Auth extension", | ||
"version": "0.3.0-canary.20240709T173725", | ||
"version": "0.3.0-canary.20240716T173531", | ||
"author": "EdgeDB <info@edgedb.com>", | ||
@@ -40,3 +40,3 @@ "repository": { | ||
"ts-jest": "29.1.4", | ||
"typescript": "^5.4.5" | ||
"typescript": "^5.5.2" | ||
}, | ||
@@ -43,0 +43,0 @@ "peerDependencies": { |
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
42643
1063