@alien_org/auth-client 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +55 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +50 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) {
|
|
6
|
+
__defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
if (symbols) {
|
|
12
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
13
|
+
}
|
|
14
|
+
return target;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
1
18
|
let zod = require("zod");
|
|
2
19
|
|
|
3
20
|
//#region ../../node_modules/.bun/jose@6.1.3/node_modules/jose/dist/webapi/lib/buffer_utils.js
|
|
@@ -50,6 +67,23 @@ function decode(input) {
|
|
|
50
67
|
|
|
51
68
|
//#endregion
|
|
52
69
|
//#region ../../node_modules/.bun/jose@6.1.3/node_modules/jose/dist/webapi/util/errors.js
|
|
70
|
+
var errors_exports = /* @__PURE__ */ __exportAll({
|
|
71
|
+
JOSEAlgNotAllowed: () => JOSEAlgNotAllowed,
|
|
72
|
+
JOSEError: () => JOSEError,
|
|
73
|
+
JOSENotSupported: () => JOSENotSupported,
|
|
74
|
+
JWEDecryptionFailed: () => JWEDecryptionFailed,
|
|
75
|
+
JWEInvalid: () => JWEInvalid,
|
|
76
|
+
JWKInvalid: () => JWKInvalid,
|
|
77
|
+
JWKSInvalid: () => JWKSInvalid,
|
|
78
|
+
JWKSMultipleMatchingKeys: () => JWKSMultipleMatchingKeys,
|
|
79
|
+
JWKSNoMatchingKey: () => JWKSNoMatchingKey,
|
|
80
|
+
JWKSTimeout: () => JWKSTimeout,
|
|
81
|
+
JWSInvalid: () => JWSInvalid,
|
|
82
|
+
JWSSignatureVerificationFailed: () => JWSSignatureVerificationFailed,
|
|
83
|
+
JWTClaimValidationFailed: () => JWTClaimValidationFailed,
|
|
84
|
+
JWTExpired: () => JWTExpired,
|
|
85
|
+
JWTInvalid: () => JWTInvalid
|
|
86
|
+
});
|
|
53
87
|
var JOSEError = class extends Error {
|
|
54
88
|
static code = "ERR_JOSE_GENERIC";
|
|
55
89
|
code = "ERR_JOSE_GENERIC";
|
|
@@ -101,6 +135,17 @@ var JOSENotSupported = class extends JOSEError {
|
|
|
101
135
|
static code = "ERR_JOSE_NOT_SUPPORTED";
|
|
102
136
|
code = "ERR_JOSE_NOT_SUPPORTED";
|
|
103
137
|
};
|
|
138
|
+
var JWEDecryptionFailed = class extends JOSEError {
|
|
139
|
+
static code = "ERR_JWE_DECRYPTION_FAILED";
|
|
140
|
+
code = "ERR_JWE_DECRYPTION_FAILED";
|
|
141
|
+
constructor(message$1 = "decryption operation failed", options) {
|
|
142
|
+
super(message$1, options);
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
var JWEInvalid = class extends JOSEError {
|
|
146
|
+
static code = "ERR_JWE_INVALID";
|
|
147
|
+
code = "ERR_JWE_INVALID";
|
|
148
|
+
};
|
|
104
149
|
var JWSInvalid = class extends JOSEError {
|
|
105
150
|
static code = "ERR_JWS_INVALID";
|
|
106
151
|
code = "ERR_JWS_INVALID";
|
|
@@ -109,6 +154,10 @@ var JWTInvalid = class extends JOSEError {
|
|
|
109
154
|
static code = "ERR_JWT_INVALID";
|
|
110
155
|
code = "ERR_JWT_INVALID";
|
|
111
156
|
};
|
|
157
|
+
var JWKInvalid = class extends JOSEError {
|
|
158
|
+
static code = "ERR_JWK_INVALID";
|
|
159
|
+
code = "ERR_JWK_INVALID";
|
|
160
|
+
};
|
|
112
161
|
var JWKSInvalid = class extends JOSEError {
|
|
113
162
|
static code = "ERR_JWKS_INVALID";
|
|
114
163
|
code = "ERR_JWKS_INVALID";
|
|
@@ -1240,4 +1289,10 @@ const createAuthClient = ({ jwksUrl } = {}) => {
|
|
|
1240
1289
|
};
|
|
1241
1290
|
|
|
1242
1291
|
//#endregion
|
|
1292
|
+
Object.defineProperty(exports, 'JwtErrors', {
|
|
1293
|
+
enumerable: true,
|
|
1294
|
+
get: function () {
|
|
1295
|
+
return errors_exports;
|
|
1296
|
+
}
|
|
1297
|
+
});
|
|
1243
1298
|
exports.createAuthClient = createAuthClient;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JWTVerifyGetKey } from "jose";
|
|
1
|
+
import { JWTVerifyGetKey, errors as JwtErrors } from "jose";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/types.d.ts
|
|
@@ -29,4 +29,4 @@ declare const createAuthClient: ({
|
|
|
29
29
|
jwksUrl
|
|
30
30
|
}?: AuthClientOptions) => AuthClient;
|
|
31
31
|
//#endregion
|
|
32
|
-
export { type AuthClient, type AuthClientOptions, createAuthClient };
|
|
32
|
+
export { type AuthClient, type AuthClientOptions, JwtErrors, createAuthClient };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { JWTVerifyGetKey } from "jose";
|
|
2
|
+
import { JWTVerifyGetKey, errors as JwtErrors } from "jose";
|
|
3
3
|
|
|
4
4
|
//#region src/types.d.ts
|
|
5
5
|
/**
|
|
@@ -29,4 +29,4 @@ declare const createAuthClient: ({
|
|
|
29
29
|
jwksUrl
|
|
30
30
|
}?: AuthClientOptions) => AuthClient;
|
|
31
31
|
//#endregion
|
|
32
|
-
export { type AuthClient, type AuthClientOptions, createAuthClient };
|
|
32
|
+
export { type AuthClient, type AuthClientOptions, JwtErrors, createAuthClient };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
|
+
//#region rolldown:runtime
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __exportAll = (all, symbols) => {
|
|
6
|
+
let target = {};
|
|
7
|
+
for (var name in all) {
|
|
8
|
+
__defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
if (symbols) {
|
|
14
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
15
|
+
}
|
|
16
|
+
return target;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
3
20
|
//#region ../../node_modules/.bun/jose@6.1.3/node_modules/jose/dist/webapi/lib/buffer_utils.js
|
|
4
21
|
const encoder = new TextEncoder();
|
|
5
22
|
const decoder = new TextDecoder();
|
|
@@ -50,6 +67,23 @@ function decode(input) {
|
|
|
50
67
|
|
|
51
68
|
//#endregion
|
|
52
69
|
//#region ../../node_modules/.bun/jose@6.1.3/node_modules/jose/dist/webapi/util/errors.js
|
|
70
|
+
var errors_exports = /* @__PURE__ */ __exportAll({
|
|
71
|
+
JOSEAlgNotAllowed: () => JOSEAlgNotAllowed,
|
|
72
|
+
JOSEError: () => JOSEError,
|
|
73
|
+
JOSENotSupported: () => JOSENotSupported,
|
|
74
|
+
JWEDecryptionFailed: () => JWEDecryptionFailed,
|
|
75
|
+
JWEInvalid: () => JWEInvalid,
|
|
76
|
+
JWKInvalid: () => JWKInvalid,
|
|
77
|
+
JWKSInvalid: () => JWKSInvalid,
|
|
78
|
+
JWKSMultipleMatchingKeys: () => JWKSMultipleMatchingKeys,
|
|
79
|
+
JWKSNoMatchingKey: () => JWKSNoMatchingKey,
|
|
80
|
+
JWKSTimeout: () => JWKSTimeout,
|
|
81
|
+
JWSInvalid: () => JWSInvalid,
|
|
82
|
+
JWSSignatureVerificationFailed: () => JWSSignatureVerificationFailed,
|
|
83
|
+
JWTClaimValidationFailed: () => JWTClaimValidationFailed,
|
|
84
|
+
JWTExpired: () => JWTExpired,
|
|
85
|
+
JWTInvalid: () => JWTInvalid
|
|
86
|
+
});
|
|
53
87
|
var JOSEError = class extends Error {
|
|
54
88
|
static code = "ERR_JOSE_GENERIC";
|
|
55
89
|
code = "ERR_JOSE_GENERIC";
|
|
@@ -101,6 +135,17 @@ var JOSENotSupported = class extends JOSEError {
|
|
|
101
135
|
static code = "ERR_JOSE_NOT_SUPPORTED";
|
|
102
136
|
code = "ERR_JOSE_NOT_SUPPORTED";
|
|
103
137
|
};
|
|
138
|
+
var JWEDecryptionFailed = class extends JOSEError {
|
|
139
|
+
static code = "ERR_JWE_DECRYPTION_FAILED";
|
|
140
|
+
code = "ERR_JWE_DECRYPTION_FAILED";
|
|
141
|
+
constructor(message$1 = "decryption operation failed", options) {
|
|
142
|
+
super(message$1, options);
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
var JWEInvalid = class extends JOSEError {
|
|
146
|
+
static code = "ERR_JWE_INVALID";
|
|
147
|
+
code = "ERR_JWE_INVALID";
|
|
148
|
+
};
|
|
104
149
|
var JWSInvalid = class extends JOSEError {
|
|
105
150
|
static code = "ERR_JWS_INVALID";
|
|
106
151
|
code = "ERR_JWS_INVALID";
|
|
@@ -109,6 +154,10 @@ var JWTInvalid = class extends JOSEError {
|
|
|
109
154
|
static code = "ERR_JWT_INVALID";
|
|
110
155
|
code = "ERR_JWT_INVALID";
|
|
111
156
|
};
|
|
157
|
+
var JWKInvalid = class extends JOSEError {
|
|
158
|
+
static code = "ERR_JWK_INVALID";
|
|
159
|
+
code = "ERR_JWK_INVALID";
|
|
160
|
+
};
|
|
112
161
|
var JWKSInvalid = class extends JOSEError {
|
|
113
162
|
static code = "ERR_JWKS_INVALID";
|
|
114
163
|
code = "ERR_JWKS_INVALID";
|
|
@@ -1240,4 +1289,4 @@ const createAuthClient = ({ jwksUrl } = {}) => {
|
|
|
1240
1289
|
};
|
|
1241
1290
|
|
|
1242
1291
|
//#endregion
|
|
1243
|
-
export { createAuthClient };
|
|
1292
|
+
export { errors_exports as JwtErrors, createAuthClient };
|