Comparing version 1.0.0-beta.0 to 1.0.0-beta.2
import { KeysToCamelCase, NormalizeKeyPaths } from "@silverhand/essentials"; | ||
import * as s from "superstruct"; | ||
import { JWTVerifyGetKey } from "jose"; | ||
import * as s from "superstruct"; | ||
export const ContentType: { | ||
@@ -100,6 +100,4 @@ formUrlEncoded: { | ||
}; | ||
requester: { | ||
not_provide_fetch: string; | ||
}; | ||
crypto_subtle_unavailable: string; | ||
unexpected_response_error: string; | ||
}>; | ||
@@ -112,2 +110,9 @@ export type LogtoErrorCode = NormalizeKeyPaths<typeof logtoErrorCodes>; | ||
} | ||
export const logtoRequestErrorSchema: s.Struct<{ | ||
code: string; | ||
message: string; | ||
}, { | ||
code: s.Struct<string, null>; | ||
message: s.Struct<string, null>; | ||
}>; | ||
export class LogtoRequestError extends Error { | ||
@@ -114,0 +119,0 @@ code: string; |
var $eVySA$camelcasekeys = require("camelcase-keys"); | ||
var $eVySA$silverhandessentials = require("@silverhand/essentials"); | ||
var $eVySA$lodashget = require("lodash.get"); | ||
var $eVySA$superstruct = require("superstruct"); | ||
var $eVySA$jose = require("jose"); | ||
var $eVySA$superstruct = require("superstruct"); | ||
@@ -148,21 +148,21 @@ function $parcel$exportWildcard(dest, source) { | ||
$parcel$export($47fe17290a91cd19$exports, "LogtoError", () => $47fe17290a91cd19$export$ba60d77e6748b659); | ||
$parcel$export($47fe17290a91cd19$exports, "logtoRequestErrorSchema", () => $47fe17290a91cd19$export$cccd51a00718f001); | ||
$parcel$export($47fe17290a91cd19$exports, "LogtoRequestError", () => $47fe17290a91cd19$export$e6e15b8ba42b9b70); | ||
$parcel$export($47fe17290a91cd19$exports, "OidcError", () => $47fe17290a91cd19$export$d4832bcf9ce430e0); | ||
const $47fe17290a91cd19$var$logtoErrorCodes = Object.freeze({ | ||
id_token: { | ||
invalid_iat: "Invalid issued at time", | ||
invalid_token: "Invalid token" | ||
invalid_iat: "Invalid issued at time in the ID token", | ||
invalid_token: "Invalid ID token" | ||
}, | ||
callback_uri_verification: { | ||
redirect_uri_mismatched: "Redirect URI mismatched", | ||
error_found: "Error found", | ||
missing_state: "Missing state", | ||
state_mismatched: "State mismatched", | ||
missing_code: "Missing code" | ||
redirect_uri_mismatched: "The callback URI mismatches the redirect URI.", | ||
error_found: "Error found in the callback URI", | ||
missing_state: "Missing state in the callback URI", | ||
state_mismatched: "State mismatched in the callback URI", | ||
missing_code: "Missing code in the callback URI" | ||
}, | ||
requester: { | ||
not_provide_fetch: "Should provide a fetch function under Node.js" | ||
}, | ||
crypto_subtle_unavailable: "Crypto.subtle is unavailable in insecure contexts (non-HTTPS)." | ||
crypto_subtle_unavailable: "Crypto.subtle is unavailable in insecure contexts (non-HTTPS).", | ||
unexpected_response_error: "Unexpected response error from the server." | ||
}); | ||
@@ -182,2 +182,6 @@ const $47fe17290a91cd19$var$getMessageByErrorCode = (errorCode)=>{ | ||
} | ||
const $47fe17290a91cd19$export$cccd51a00718f001 = $eVySA$superstruct.type({ | ||
code: $eVySA$superstruct.string(), | ||
message: $eVySA$superstruct.string() | ||
}); | ||
class $47fe17290a91cd19$export$e6e15b8ba42b9b70 extends Error { | ||
@@ -184,0 +188,0 @@ constructor(code, message){ |
import $lyZgO$camelcasekeys from "camelcase-keys"; | ||
import {conditional as $lyZgO$conditional, UrlSafeBase64 as $lyZgO$UrlSafeBase64} from "@silverhand/essentials"; | ||
import $lyZgO$lodashget from "lodash.get"; | ||
import {type as $lyZgO$type, string as $lyZgO$string, number as $lyZgO$number, nullable as $lyZgO$nullable, optional as $lyZgO$optional, array as $lyZgO$array, assert as $lyZgO$assert} from "superstruct"; | ||
import {jwtVerify as $lyZgO$jwtVerify} from "jose"; | ||
import {type as $lyZgO$type, string as $lyZgO$string, number as $lyZgO$number, nullable as $lyZgO$nullable, optional as $lyZgO$optional, array as $lyZgO$array, assert as $lyZgO$assert} from "superstruct"; | ||
@@ -145,21 +145,21 @@ function $parcel$exportWildcard(dest, source) { | ||
$parcel$export($ab66c74b65acc6a3$exports, "LogtoError", () => $ab66c74b65acc6a3$export$ba60d77e6748b659); | ||
$parcel$export($ab66c74b65acc6a3$exports, "logtoRequestErrorSchema", () => $ab66c74b65acc6a3$export$cccd51a00718f001); | ||
$parcel$export($ab66c74b65acc6a3$exports, "LogtoRequestError", () => $ab66c74b65acc6a3$export$e6e15b8ba42b9b70); | ||
$parcel$export($ab66c74b65acc6a3$exports, "OidcError", () => $ab66c74b65acc6a3$export$d4832bcf9ce430e0); | ||
const $ab66c74b65acc6a3$var$logtoErrorCodes = Object.freeze({ | ||
id_token: { | ||
invalid_iat: "Invalid issued at time", | ||
invalid_token: "Invalid token" | ||
invalid_iat: "Invalid issued at time in the ID token", | ||
invalid_token: "Invalid ID token" | ||
}, | ||
callback_uri_verification: { | ||
redirect_uri_mismatched: "Redirect URI mismatched", | ||
error_found: "Error found", | ||
missing_state: "Missing state", | ||
state_mismatched: "State mismatched", | ||
missing_code: "Missing code" | ||
redirect_uri_mismatched: "The callback URI mismatches the redirect URI.", | ||
error_found: "Error found in the callback URI", | ||
missing_state: "Missing state in the callback URI", | ||
state_mismatched: "State mismatched in the callback URI", | ||
missing_code: "Missing code in the callback URI" | ||
}, | ||
requester: { | ||
not_provide_fetch: "Should provide a fetch function under Node.js" | ||
}, | ||
crypto_subtle_unavailable: "Crypto.subtle is unavailable in insecure contexts (non-HTTPS)." | ||
crypto_subtle_unavailable: "Crypto.subtle is unavailable in insecure contexts (non-HTTPS).", | ||
unexpected_response_error: "Unexpected response error from the server." | ||
}); | ||
@@ -179,2 +179,6 @@ const $ab66c74b65acc6a3$var$getMessageByErrorCode = (errorCode)=>{ | ||
} | ||
const $ab66c74b65acc6a3$export$cccd51a00718f001 = $lyZgO$type({ | ||
code: $lyZgO$string(), | ||
message: $lyZgO$string() | ||
}); | ||
class $ab66c74b65acc6a3$export$e6e15b8ba42b9b70 extends Error { | ||
@@ -319,3 +323,3 @@ constructor(code, message){ | ||
export {$ce6f2a62716522ae$export$684f740cd70532d4 as fetchTokenByAuthorizationCode, $ce6f2a62716522ae$export$9909137b467efb8b as fetchTokenByRefreshToken, $eefdbfea5ec3abd9$export$815bda5ead26b243 as discoveryPath, $eefdbfea5ec3abd9$export$98242d8e822ad11f as fetchOidcConfig, $7397ba7739ada584$export$573f8dbbf6fbef75 as revoke, $bfba480b8ff41607$export$b01a187f12b774c6 as generateSignInUri, $fcccd93c698efc4f$export$b3c9a2bd2330de28 as generateSignOutUri, $2cac19d9fad63bff$export$4851e69315d5b72c as parseUriParameters, $2cac19d9fad63bff$export$dc3fae3c99763885 as verifyAndParseCodeFromCallbackUri, $ab66c74b65acc6a3$export$ba60d77e6748b659 as LogtoError, $ab66c74b65acc6a3$export$e6e15b8ba42b9b70 as LogtoRequestError, $ab66c74b65acc6a3$export$d4832bcf9ce430e0 as OidcError, $dfd50234d3585f12$export$b5b3317c8aecbcd5 as verifyIdToken, $dfd50234d3585f12$export$aac2d5b7f5cd16d5 as decodeIdToken, $570e2e6b31a027ff$export$887ed125f549a57 as withReservedScopes, $5422b71ae76f21f1$export$e2e108cbe2e4f865 as ContentType, $5422b71ae76f21f1$export$3f2aafdd1ccae76c as TokenGrantType, $5422b71ae76f21f1$export$65f63a8bc3cba53d as QueryKey, $5422b71ae76f21f1$export$83716a4aa1642908 as Prompt}; | ||
export {$ce6f2a62716522ae$export$684f740cd70532d4 as fetchTokenByAuthorizationCode, $ce6f2a62716522ae$export$9909137b467efb8b as fetchTokenByRefreshToken, $eefdbfea5ec3abd9$export$815bda5ead26b243 as discoveryPath, $eefdbfea5ec3abd9$export$98242d8e822ad11f as fetchOidcConfig, $7397ba7739ada584$export$573f8dbbf6fbef75 as revoke, $bfba480b8ff41607$export$b01a187f12b774c6 as generateSignInUri, $fcccd93c698efc4f$export$b3c9a2bd2330de28 as generateSignOutUri, $2cac19d9fad63bff$export$4851e69315d5b72c as parseUriParameters, $2cac19d9fad63bff$export$dc3fae3c99763885 as verifyAndParseCodeFromCallbackUri, $ab66c74b65acc6a3$export$ba60d77e6748b659 as LogtoError, $ab66c74b65acc6a3$export$cccd51a00718f001 as logtoRequestErrorSchema, $ab66c74b65acc6a3$export$e6e15b8ba42b9b70 as LogtoRequestError, $ab66c74b65acc6a3$export$d4832bcf9ce430e0 as OidcError, $dfd50234d3585f12$export$b5b3317c8aecbcd5 as verifyIdToken, $dfd50234d3585f12$export$aac2d5b7f5cd16d5 as decodeIdToken, $570e2e6b31a027ff$export$887ed125f549a57 as withReservedScopes, $5422b71ae76f21f1$export$e2e108cbe2e4f865 as ContentType, $5422b71ae76f21f1$export$3f2aafdd1ccae76c as TokenGrantType, $5422b71ae76f21f1$export$65f63a8bc3cba53d as QueryKey, $5422b71ae76f21f1$export$83716a4aa1642908 as Prompt}; | ||
//# sourceMappingURL=module.js.map |
{ | ||
"name": "@logto/js", | ||
"version": "1.0.0-beta.0", | ||
"version": "1.0.0-beta.2", | ||
"source": "./src/index.ts", | ||
@@ -67,3 +67,3 @@ "main": "./lib/index.js", | ||
}, | ||
"gitHead": "f0f78e6f0b97174de98588b35d1d12c8396206ba" | ||
"gitHead": "212891497b04e3a5fd6b24bbbeec227dfec8ae53" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
92762
9
718
0
41