@gatewaystack/identifiabl-core 0.1.0
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/README.md +342 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.js +109 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +24 -0
package/README.md
ADDED
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
# @gatewaystack/identifiabl-core
|
|
2
|
+
|
|
3
|
+
Core identity verification for GatewayStack.
|
|
4
|
+
Verifies RS256 JWTs against a JWKS endpoint and maps them into a normalized `GatewayIdentity` object.
|
|
5
|
+
|
|
6
|
+
`@gatewaystack/identifiabl-core` is a small, framework-agnostic helper for:
|
|
7
|
+
|
|
8
|
+
- Verifying RS256 JWTs with `jose` and a remote JWKS URL
|
|
9
|
+
- Enforcing `iss` (issuer) and `aud` (audience)
|
|
10
|
+
- Normalizing identity claims (`sub`, `email`, `name`, tenant, roles, scopes, plan)
|
|
11
|
+
- Returning a consistent `VerifyResult` you can plug into gateways, middlewares, or Firebase Functions
|
|
12
|
+
- Multi-audience support (verify tokens for different API identifiers)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
`@gatewaystack/identifiabl-core` is the low-level verifier behind
|
|
17
|
+
[identifiabl](https://www.npmjs.com/package/identifiabl) and the broader
|
|
18
|
+
[GatewayStack](https://gatewaystack.com) modules.
|
|
19
|
+
|
|
20
|
+
If you want an opinionated HTTP/middleware layer for Apps SDK / MCP backends,
|
|
21
|
+
start with `identifiabl`. If you just need a small, framework-agnostic verifier
|
|
22
|
+
that returns a normalized identity object, use `@gatewaystack/identifiabl-core` directly.
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install @gatewaystack/identifiabl-core jose
|
|
28
|
+
# or
|
|
29
|
+
yarn add @gatewaystack/identifiabl-core jose
|
|
30
|
+
# or
|
|
31
|
+
pnpm add @gatewaystack/identifiabl-core jose
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Quick Start
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
import { createIdentifiablVerifier } from "@gatewaystack/identifiabl-core";
|
|
38
|
+
|
|
39
|
+
const verify = createIdentifiablVerifier({
|
|
40
|
+
issuer: "https://dev-xxxxx.us.auth0.com/",
|
|
41
|
+
audience: "https://inner.app/api",
|
|
42
|
+
// optional mappings:
|
|
43
|
+
source: "auth0",
|
|
44
|
+
tenantClaim: "https://inner.app/tenant_id",
|
|
45
|
+
roleClaim: "https://inner.app/roles",
|
|
46
|
+
scopeClaim: "scope",
|
|
47
|
+
planClaim: "https://inner.app/plan"
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
async function handleRequest(bearerToken: string) {
|
|
51
|
+
const token = bearerToken.replace(/^Bearer\s+/i, "");
|
|
52
|
+
|
|
53
|
+
const result = await verify(token);
|
|
54
|
+
|
|
55
|
+
if (!result.ok) {
|
|
56
|
+
console.error("JWT verification failed:", result.error, result.detail);
|
|
57
|
+
// return 401 / throw / etc.
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const { identity, payload } = result;
|
|
62
|
+
|
|
63
|
+
console.log("Verified user:", identity.sub);
|
|
64
|
+
console.log("Tenant:", identity.tenantId);
|
|
65
|
+
console.log("Roles:", identity.roles);
|
|
66
|
+
console.log("Scopes:", identity.scopes);
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## API
|
|
71
|
+
|
|
72
|
+
### createIdentifiablVerifier(config)
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import { createIdentifiablVerifier } from "@gatewaystack/identifiabl-core";
|
|
76
|
+
|
|
77
|
+
const verify = createIdentifiablVerifier(config);
|
|
78
|
+
const result = await verify(token);
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### IdentifiablCoreConfig
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
interface IdentifiablCoreConfig {
|
|
85
|
+
issuer: string; // Expected issuer (e.g. Auth0 domain)
|
|
86
|
+
audience: string; // Expected audience / API identifier
|
|
87
|
+
jwksUri?: string; // Optional override; defaults to `${issuer}/.well-known/jwks.json`
|
|
88
|
+
source?: string; // Optional identity source label (e.g. "auth0", "stytch", "cognito")
|
|
89
|
+
|
|
90
|
+
tenantClaim?: string; // Claim name for tenant / org id
|
|
91
|
+
roleClaim?: string; // Claim name for roles array
|
|
92
|
+
scopeClaim?: string; // Claim name for space-separated scopes string
|
|
93
|
+
planClaim?: string; // Claim name for plan / subscription tier
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
#### issuer
|
|
98
|
+
|
|
99
|
+
Used both to:
|
|
100
|
+
|
|
101
|
+
- Build a default JWKS URL (`${issuer}/.well-known/jwks.json` after trimming trailing `/`)
|
|
102
|
+
- Validate the `iss` claim. Trailing slashes are tolerated (e.g. `https://foo/` equals `https://foo`).
|
|
103
|
+
|
|
104
|
+
#### audience
|
|
105
|
+
|
|
106
|
+
Passed directly to `jwtVerify` to enforce the `aud` claim.
|
|
107
|
+
|
|
108
|
+
#### jwksUri (optional)
|
|
109
|
+
|
|
110
|
+
Override if your JWKS lives somewhere else.
|
|
111
|
+
|
|
112
|
+
#### Claim mapping fields
|
|
113
|
+
|
|
114
|
+
Let you adapt to different identity providers without changing code:
|
|
115
|
+
|
|
116
|
+
- `tenantClaim` → mapped to `identity.tenantId`
|
|
117
|
+
- `roleClaim` → mapped to `identity.roles: string[]`
|
|
118
|
+
- `scopeClaim` → split on spaces into `identity.scopes: string[]`
|
|
119
|
+
- `planClaim` → mapped to `identity.plan`
|
|
120
|
+
|
|
121
|
+
### VerifyResult
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
type VerifyResult =
|
|
125
|
+
| {
|
|
126
|
+
ok: true;
|
|
127
|
+
identity: GatewayIdentity;
|
|
128
|
+
payload: JWTPayload;
|
|
129
|
+
}
|
|
130
|
+
| {
|
|
131
|
+
ok: false;
|
|
132
|
+
error: string;
|
|
133
|
+
detail?: string;
|
|
134
|
+
};
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
#### On success
|
|
138
|
+
|
|
139
|
+
`identity` is a normalized view of the user:
|
|
140
|
+
|
|
141
|
+
- `sub`: subject (required)
|
|
142
|
+
- `issuer`: normalized issuer (no trailing `/`)
|
|
143
|
+
- `email`, `name` (if present)
|
|
144
|
+
- `tenantId`, `roles`, `scopes`, `plan` (based on your config)
|
|
145
|
+
- `source`: identity provider label (defaults to "auth0")
|
|
146
|
+
- `raw`: the full decoded JWT payload
|
|
147
|
+
|
|
148
|
+
#### On failure
|
|
149
|
+
|
|
150
|
+
- `error` is a short code (currently `invalid_token`)
|
|
151
|
+
- `detail` is the underlying error message from jose when available
|
|
152
|
+
|
|
153
|
+
## Example: Firebase Callable Function
|
|
154
|
+
|
|
155
|
+
```typescript
|
|
156
|
+
import * as functions from "firebase-functions/v2/https";
|
|
157
|
+
import { createIdentifiablVerifier } from "@gatewaystack/identifiabl-core";
|
|
158
|
+
|
|
159
|
+
const verify = createIdentifiablVerifier({
|
|
160
|
+
issuer: "https://dev-xxxxx.us.auth0.com/",
|
|
161
|
+
audience: "https://inner.app/api",
|
|
162
|
+
tenantClaim: "https://inner.app/tenant_id"
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
export const myProtectedFunction = functions.onCall(async (req) => {
|
|
166
|
+
const token = req.rawRequest.headers.authorization?.replace(/^Bearer\s+/i, "");
|
|
167
|
+
if (!token) {
|
|
168
|
+
throw new functions.HttpsError("unauthenticated", "Missing bearer token");
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const result = await verify(token);
|
|
172
|
+
if (!result.ok) {
|
|
173
|
+
throw new functions.HttpsError("unauthenticated", "Invalid or expired token");
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const { identity } = result;
|
|
177
|
+
// Use identity.sub / identity.tenantId / etc.
|
|
178
|
+
return { ok: true, user: identity.sub, tenantId: identity.tenantId };
|
|
179
|
+
});
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## what identifiabl replaces under the hood
|
|
183
|
+
You **do not** need to write any of the code in this section if you're using
|
|
184
|
+
`@gatewaystack/identifiabl-core`. This is an example of the kind of hand-rolled
|
|
185
|
+
JWT/JWKS + identity plumbing that `createIdentifiablVerifier()` is designed to replace.
|
|
186
|
+
|
|
187
|
+
**1. `verifyToken` — verify oidc / apps sdk identity tokens**
|
|
188
|
+
validates rs256 jwts, audiences, issuers, expirations, and nonce.
|
|
189
|
+
|
|
190
|
+
a minimal typescript implementation:
|
|
191
|
+
```ts
|
|
192
|
+
// auth/verifyToken.ts
|
|
193
|
+
import { createRemoteJWKSet, jwtVerify, JWTPayload } from 'jose';
|
|
194
|
+
|
|
195
|
+
const ISSUER = process.env.AUTH_ISSUER!;
|
|
196
|
+
const AUDIENCE = process.env.AUTH_AUDIENCE!;
|
|
197
|
+
const JWKS_URI = process.env.AUTH_JWKS_URI!;
|
|
198
|
+
|
|
199
|
+
const jwks = createRemoteJWKSet(new URL(JWKS_URI));
|
|
200
|
+
|
|
201
|
+
export type VerifiedIdentity = {
|
|
202
|
+
user_id: string;
|
|
203
|
+
org_id?: string;
|
|
204
|
+
tenant?: string;
|
|
205
|
+
roles: string[];
|
|
206
|
+
scopes: string[];
|
|
207
|
+
raw: JWTPayload;
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
export async function verifyToken(authorizationHeader: string | undefined): Promise<VerifiedIdentity> {
|
|
211
|
+
if (!authorizationHeader?.startsWith('Bearer ')) {
|
|
212
|
+
throw new Error('missing or invalid bearer token');
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const token = authorizationHeader.slice('Bearer '.length).trim();
|
|
216
|
+
|
|
217
|
+
const { payload } = await jwtVerify(token, jwks, {
|
|
218
|
+
issuer: ISSUER,
|
|
219
|
+
audience: AUDIENCE,
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
return extractIdentity(payload);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
function extractIdentity(payload: JWTPayload): VerifiedIdentity {
|
|
226
|
+
const scopes =
|
|
227
|
+
typeof payload.scope === 'string'
|
|
228
|
+
? payload.scope.split(' ').filter(Boolean)
|
|
229
|
+
: Array.isArray(payload.scope)
|
|
230
|
+
? payload.scope.map(String)
|
|
231
|
+
: [];
|
|
232
|
+
|
|
233
|
+
return {
|
|
234
|
+
user_id: String(payload.sub ?? ''),
|
|
235
|
+
org_id: (payload['org_id'] as string) ?? undefined,
|
|
236
|
+
tenant: (payload['tenant'] as string) ?? undefined,
|
|
237
|
+
roles: (payload['roles'] as string[]) ?? [],
|
|
238
|
+
scopes,
|
|
239
|
+
raw: payload,
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
**2. `extractIdentity` — normalize user/org/tenant metadata**
|
|
245
|
+
implemented inside `verifyToken` above, it returns a canonical structure:
|
|
246
|
+
```ts
|
|
247
|
+
{ user_id, org_id, tenant, roles, scopes }
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
**3. `attachIdentity` — bind identity to model request metadata**
|
|
251
|
+
injects identity into headers or context fields for downstream modules.
|
|
252
|
+
```ts
|
|
253
|
+
// middleware/attachIdentity.ts
|
|
254
|
+
import type { Request, Response, NextFunction } from 'express';
|
|
255
|
+
import { verifyToken, VerifiedIdentity } from '../auth/verifyToken';
|
|
256
|
+
|
|
257
|
+
declare module 'express-serve-static-core' {
|
|
258
|
+
interface Request {
|
|
259
|
+
identity?: VerifiedIdentity;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export async function attachIdentity(req: Request, res: Response, next: NextFunction) {
|
|
264
|
+
try {
|
|
265
|
+
const authHeader = req.headers['authorization'] as string | undefined;
|
|
266
|
+
|
|
267
|
+
const identity = await verifyToken(authHeader);
|
|
268
|
+
|
|
269
|
+
// attach to request for downstream handlers / modules
|
|
270
|
+
req.identity = identity;
|
|
271
|
+
|
|
272
|
+
// inject normalized identity headers for downstream services / proxies
|
|
273
|
+
req.headers['x-user-id'] = identity.user_id;
|
|
274
|
+
if (identity.org_id) req.headers['x-org-id'] = identity.org_id;
|
|
275
|
+
if (identity.tenant) req.headers['x-tenant'] = identity.tenant;
|
|
276
|
+
req.headers['x-user-scopes'] = identity.scopes.join(' ');
|
|
277
|
+
|
|
278
|
+
return next();
|
|
279
|
+
} catch (err) {
|
|
280
|
+
return res.status(401).json({
|
|
281
|
+
error: 'unauthorized',
|
|
282
|
+
reason: (err as Error).message ?? 'token validation failed',
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
then wire it up in your gateway server:
|
|
289
|
+
```ts
|
|
290
|
+
import express from 'express';
|
|
291
|
+
import { attachIdentity } from './middleware/attachIdentity';
|
|
292
|
+
|
|
293
|
+
const app = express();
|
|
294
|
+
|
|
295
|
+
app.use(attachIdentity);
|
|
296
|
+
|
|
297
|
+
// all downstream routes now see req.identity and identity headers
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
**4. `assertIdentity` — enforce presence of user identity**
|
|
301
|
+
guarantees that no anonymous or shared-key requests pass through.
|
|
302
|
+
```ts
|
|
303
|
+
// middleware/assertIdentity.ts
|
|
304
|
+
import type { Request, Response, NextFunction } from 'express';
|
|
305
|
+
|
|
306
|
+
export function assertIdentity(req: Request, res: Response, next: NextFunction) {
|
|
307
|
+
if (!req.identity) {
|
|
308
|
+
return res.status(401).json({ error: 'unauthorized', reason: 'missing user identity' });
|
|
309
|
+
}
|
|
310
|
+
return next();
|
|
311
|
+
}
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
**5. `logIdentity` — produce identity-level audit events**
|
|
315
|
+
emits structured logs for compliance, analytics, and debugging.
|
|
316
|
+
```ts
|
|
317
|
+
// inside your request pipeline
|
|
318
|
+
logger.info('identity_event', {
|
|
319
|
+
user_id: req.identity?.user_id,
|
|
320
|
+
org_id: req.identity?.org_id,
|
|
321
|
+
scopes: req.identity?.scopes,
|
|
322
|
+
path: req.path,
|
|
323
|
+
action: 'model_request',
|
|
324
|
+
});
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
## Implementation Notes
|
|
328
|
+
|
|
329
|
+
Uses `jose` under the hood:
|
|
330
|
+
|
|
331
|
+
- `createRemoteJWKSet` to fetch and cache keys
|
|
332
|
+
- `jwtVerify` with `algorithms: ["RS256"]`
|
|
333
|
+
- `clockTolerance: "60s"` to allow for small clock skew
|
|
334
|
+
|
|
335
|
+
Currently focused on RS256 JWTs; other algorithms are intentionally not allowed.
|
|
336
|
+
|
|
337
|
+
## Related
|
|
338
|
+
|
|
339
|
+
- High-level identity gateway for Apps SDK / MCP backends:
|
|
340
|
+
[`identifiabl` on npm](https://www.npmjs.com/package/identifiabl) / [identifiabl.com](https://identifiabl.com)
|
|
341
|
+
- GatewayStack (user-scoped trust & governance gateway):
|
|
342
|
+
https://github.com/davidcrowe/gatewaystack
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type JWTPayload } from "jose";
|
|
2
|
+
export type IdentitySource = "auth0" | "stytch" | "cognito" | "custom" | string;
|
|
3
|
+
export interface GatewayIdentity {
|
|
4
|
+
sub: string;
|
|
5
|
+
issuer: string;
|
|
6
|
+
tenantId?: string;
|
|
7
|
+
email?: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
roles?: string[];
|
|
10
|
+
scopes?: string[];
|
|
11
|
+
plan?: string;
|
|
12
|
+
source: IdentitySource;
|
|
13
|
+
raw: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
export interface IdentifiablCoreConfig {
|
|
16
|
+
issuer: string;
|
|
17
|
+
audience: string | string[];
|
|
18
|
+
jwksUri?: string;
|
|
19
|
+
source?: IdentitySource;
|
|
20
|
+
tenantClaim?: string;
|
|
21
|
+
roleClaim?: string;
|
|
22
|
+
scopeClaim?: string;
|
|
23
|
+
planClaim?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface VerifySuccess {
|
|
26
|
+
ok: true;
|
|
27
|
+
identity: GatewayIdentity;
|
|
28
|
+
payload: JWTPayload;
|
|
29
|
+
}
|
|
30
|
+
export interface VerifyFailure {
|
|
31
|
+
ok: false;
|
|
32
|
+
error: string;
|
|
33
|
+
detail?: string;
|
|
34
|
+
}
|
|
35
|
+
export type VerifyResult = VerifySuccess | VerifyFailure;
|
|
36
|
+
/**
|
|
37
|
+
* Factory that returns a token verifier you can use in any environment.
|
|
38
|
+
*/
|
|
39
|
+
export declare function createIdentifiablVerifier(config: IdentifiablCoreConfig): (token: string) => Promise<VerifyResult>;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { createRemoteJWKSet, jwtVerify, } from "jose";
|
|
2
|
+
// /**
|
|
3
|
+
// * Escape a string for safe use inside a RegExp literal.
|
|
4
|
+
// */
|
|
5
|
+
// function escapeForRegex(input: string): string {
|
|
6
|
+
// return input.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
7
|
+
// }
|
|
8
|
+
// /**
|
|
9
|
+
// * Build a pattern that matches the issuer with or without a trailing slash.
|
|
10
|
+
// */
|
|
11
|
+
// function buildIssuerPattern(issuer: string): RegExp {
|
|
12
|
+
// const issuerNoSlash = issuer.replace(/\/+$/, "");
|
|
13
|
+
// return new RegExp(`^${escapeForRegex(issuerNoSlash)}\\/?$`);
|
|
14
|
+
// }
|
|
15
|
+
function mapPayloadToGatewayIdentity(payload, config, normalizedIssuer) {
|
|
16
|
+
const sub = typeof payload.sub === "string" ? payload.sub : "";
|
|
17
|
+
if (!sub) {
|
|
18
|
+
throw new Error('missing "sub" claim in token');
|
|
19
|
+
}
|
|
20
|
+
const email = typeof payload.email === "string" ? payload.email : undefined;
|
|
21
|
+
const name = typeof payload.name === "string" ? payload.name : undefined;
|
|
22
|
+
let tenantId;
|
|
23
|
+
if (config.tenantClaim) {
|
|
24
|
+
const rawTenant = payload[config.tenantClaim];
|
|
25
|
+
if (typeof rawTenant === "string") {
|
|
26
|
+
tenantId = rawTenant;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
let roles;
|
|
30
|
+
if (config.roleClaim) {
|
|
31
|
+
const rawRoles = payload[config.roleClaim];
|
|
32
|
+
if (Array.isArray(rawRoles)) {
|
|
33
|
+
roles = rawRoles.filter((r) => typeof r === "string");
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
let scopes;
|
|
37
|
+
if (config.scopeClaim) {
|
|
38
|
+
const rawScope = payload[config.scopeClaim];
|
|
39
|
+
if (typeof rawScope === "string") {
|
|
40
|
+
scopes = rawScope.split(" ").filter(Boolean);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
let plan;
|
|
44
|
+
if (config.planClaim) {
|
|
45
|
+
const rawPlan = payload[config.planClaim];
|
|
46
|
+
if (typeof rawPlan === "string") {
|
|
47
|
+
plan = rawPlan;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
sub,
|
|
52
|
+
issuer: normalizedIssuer,
|
|
53
|
+
tenantId,
|
|
54
|
+
email,
|
|
55
|
+
name,
|
|
56
|
+
roles,
|
|
57
|
+
scopes,
|
|
58
|
+
plan,
|
|
59
|
+
source: config.source ?? "auth0",
|
|
60
|
+
raw: payload,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function trimTrailingSlashes(value) {
|
|
64
|
+
let end = value.length;
|
|
65
|
+
while (end > 0 && value[end - 1] === "/") {
|
|
66
|
+
end--;
|
|
67
|
+
}
|
|
68
|
+
return value.slice(0, end);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Factory that returns a token verifier you can use in any environment.
|
|
72
|
+
*/
|
|
73
|
+
export function createIdentifiablVerifier(config) {
|
|
74
|
+
const issuerNoSlash = trimTrailingSlashes(config.issuer);
|
|
75
|
+
const audience = config.audience;
|
|
76
|
+
const jwksUri = config.jwksUri || `${issuerNoSlash}/.well-known/jwks.json`;
|
|
77
|
+
const JWKS = createRemoteJWKSet(new URL(jwksUri));
|
|
78
|
+
return async (token) => {
|
|
79
|
+
try {
|
|
80
|
+
const { payload } = await jwtVerify(token, JWKS, {
|
|
81
|
+
audience,
|
|
82
|
+
algorithms: ["RS256"],
|
|
83
|
+
clockTolerance: "60s"
|
|
84
|
+
});
|
|
85
|
+
const iss = String(payload.iss || "");
|
|
86
|
+
const issNoSlash = trimTrailingSlashes(iss);
|
|
87
|
+
if (issNoSlash !== issuerNoSlash) {
|
|
88
|
+
return {
|
|
89
|
+
ok: false,
|
|
90
|
+
error: "invalid_token",
|
|
91
|
+
detail: `unexpected "iss" claim value: ${iss}`,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
const identity = mapPayloadToGatewayIdentity(payload, config, issuerNoSlash);
|
|
95
|
+
return {
|
|
96
|
+
ok: true,
|
|
97
|
+
identity,
|
|
98
|
+
payload,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
catch (e) {
|
|
102
|
+
return {
|
|
103
|
+
ok: false,
|
|
104
|
+
error: "invalid_token",
|
|
105
|
+
detail: e?.message,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/@types/react/global.d.ts","../../../node_modules/csstype/index.d.ts","../../../node_modules/@types/react/index.d.ts","../../../node_modules/@types/react/jsx-runtime.d.ts","../node_modules/jose/dist/types/types.d.ts","../node_modules/jose/dist/types/jwe/compact/decrypt.d.ts","../node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts","../node_modules/jose/dist/types/jwe/general/decrypt.d.ts","../node_modules/jose/dist/types/jwe/general/encrypt.d.ts","../node_modules/jose/dist/types/jws/compact/verify.d.ts","../node_modules/jose/dist/types/jws/flattened/verify.d.ts","../node_modules/jose/dist/types/jws/general/verify.d.ts","../node_modules/jose/dist/types/jwt/verify.d.ts","../node_modules/jose/dist/types/jwt/decrypt.d.ts","../node_modules/jose/dist/types/jwe/compact/encrypt.d.ts","../node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts","../node_modules/jose/dist/types/jws/compact/sign.d.ts","../node_modules/jose/dist/types/jws/flattened/sign.d.ts","../node_modules/jose/dist/types/jws/general/sign.d.ts","../node_modules/jose/dist/types/jwt/sign.d.ts","../node_modules/jose/dist/types/jwt/encrypt.d.ts","../node_modules/jose/dist/types/jwk/thumbprint.d.ts","../node_modules/jose/dist/types/jwk/embedded.d.ts","../node_modules/jose/dist/types/jwks/local.d.ts","../node_modules/jose/dist/types/jwks/remote.d.ts","../node_modules/jose/dist/types/jwt/unsecured.d.ts","../node_modules/jose/dist/types/key/export.d.ts","../node_modules/jose/dist/types/key/import.d.ts","../node_modules/jose/dist/types/util/decode_protected_header.d.ts","../node_modules/jose/dist/types/util/decode_jwt.d.ts","../node_modules/jose/dist/types/util/errors.d.ts","../node_modules/jose/dist/types/key/generate_key_pair.d.ts","../node_modules/jose/dist/types/key/generate_secret.d.ts","../node_modules/jose/dist/types/util/base64url.d.ts","../node_modules/jose/dist/types/index.d.ts","../src/index.ts"],"fileIdsList":[[60,61],[62],[64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],[64],[63,94]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"170d4db14678c68178ee8a3d5a990d5afb759ecb6ec44dbd885c50f6da6204f6","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"5e76305d58bcdc924ff2bf14f6a9dc2aa5441ed06464b7e7bd039e611d66a89b","impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"f8281fad02736e3f7e2475b14bb15990b00b8358b5767a0e7dc3e774f9bf81e7","impliedFormat":99},{"version":"a380cd0a371b5b344c2f679a932593f02445571f9de0014bdf013dddf2a77376","impliedFormat":99},{"version":"dbbcd13911daafc1554acc17dad18ab92f91b5b8f084c6c4370cb8c60520c3b6","impliedFormat":99},{"version":"ab17464cd8391785c29509c629aa8477c8e86d4d3013f4c200b71ac574774ec2","impliedFormat":99},{"version":"b026daf5c00c8f2abdb49008322a7d51fbadcd7b200a99ee7a4452dbd40f0420","impliedFormat":99},{"version":"e130a73d7e1e34953b1964c17c218fd14fccd1df6f15f111352b0d53291311bb","impliedFormat":99},{"version":"4ddecad872558e2b3df434ef0b01114d245e7a18a86afa6e7b5c68e75f9b8f76","impliedFormat":99},{"version":"a0ab7a82c3f844d4d4798f68f7bd6dc304e9ad6130631c90a09fb2636cb62756","impliedFormat":99},{"version":"270ceb915b1304c042b6799de28ff212cfa4baf06900d3a8bc4b79f62f00c8a7","impliedFormat":99},{"version":"1b3174ea6e3b4ae157c88eb28bf8e6d67f044edc9c552daf5488628fd8e5be97","impliedFormat":99},{"version":"6564db88fa4cf3bae5c8e0de01c701c6228eaeef1118b4ad6a49a8aaf8556350","impliedFormat":99},{"version":"9c5a4a21ed5686b2ea080557488b966c3aeea641ef1aa8975a10e5fc59dd569f","impliedFormat":99},{"version":"5585ed538922e2e58655218652dcb262f08afa902f26f490cdec4967887ac31a","impliedFormat":99},{"version":"b46de7238d9d2243b27a21797e4772ba91465caae9c31f21dc43748dc9de9cd0","impliedFormat":99},{"version":"625fdbce788630c62f793cb6c80e0072ce0b8bf1d4d0a9922430671164371e0b","impliedFormat":99},{"version":"b6790300d245377671c085e76e9ef359b3cbba6821b913d6ce6b2739d00b9fb1","impliedFormat":99},{"version":"c92c9dc7415bf7969931ac5339f21c65687909b32d05ac89789b411372e52991","impliedFormat":99},{"version":"a36c717362d06d76e7332d9c1d2744c2c5e4b4a5da6218ef7b4a299a62d23a6d","impliedFormat":99},{"version":"a61f8455fd21cec75a8288cd761f5bcc72441848841eb64aa09569e9d8929ff0","impliedFormat":99},{"version":"b135437aa8444e851e10cb514b4a73141813e0adcfcc06d702df6aa0fd922587","impliedFormat":99},{"version":"cc82fa360f22d73b4cc7f446d08ad52b11f5aba66aa04b1ed8feb11a509e8aff","impliedFormat":99},{"version":"466e7296272b827c55b53a7858502de733733558966e2e3a7cc78274e930210a","impliedFormat":99},{"version":"364a5c527037fdd7d494ab0a97f510d3ceda30b8a4bc598b490c135f959ff3c6","impliedFormat":99},{"version":"f198de1cd91b94acc7f4d72cbccc11abadb1570bedc4ede174810e1f6985e06e","impliedFormat":99},{"version":"83d2dab980f2d1a2fe333f0001de8f42c831a438159d47b77c686ae405891b7f","impliedFormat":99},{"version":"ca369bcbdafc423d1a9dccd69de98044534900ff8236d2dd970b52438afb5355","impliedFormat":99},{"version":"5b90280e84e8eba347caaefc18210de3ce6ac176f5e82705a28e7f497dcc8689","impliedFormat":99},{"version":"34e2f00467aa6f46c1d7955f8d57bffb48ccc6ad2bbc847d0b1ccef1d55a9c3c","impliedFormat":99},{"version":"f09dfae4ff5f84c1341d74208e9b442659c32d039e9d27c09f79a203755e953d","impliedFormat":99},{"version":"e7878d8cd1fd0d0f1c55dcd8f5539f4c22e44993852f588dd194bd666b230727","impliedFormat":99},{"version":"0d22b18cb407b03331edf3413b93e568da71130c906fd69911090df2abf55414","impliedFormat":99},{"version":"f232e2ef4a0f37274d4246c6421c4775b867fac6397a8436c5d26ce0a69b792b","signature":"6dbde98c2ba5c630a88f915d44227418f19f125dc67c4f3ce89a0107545e7c17"}],"root":[95],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"jsx":4,"jsxImportSource":"react","module":99,"outDir":"./","rootDir":"../src","skipLibCheck":true,"strict":true,"target":9,"tsBuildInfoFile":"./tsconfig.tsbuildinfo"},"referencedMap":[[62,1],[63,2],[94,3],[65,4],[74,4],[66,4],[75,4],[67,4],[68,4],[82,4],[81,4],[83,4],[84,4],[76,4],[69,4],[77,4],[70,4],[78,4],[71,4],[73,4],[80,4],[79,4],[85,4],[72,4],[86,4],[91,4],[92,4],[87,4],[89,4],[88,4],[90,4],[95,5]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gatewaystack/identifiabl-core",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "RS256 JWT verification and identity mapping for GatewayStack.",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/davidcrowe/gatewaystack.git",
|
|
12
|
+
"directory": "packages/identifiabl-core"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc -p tsconfig.json",
|
|
19
|
+
"prepublishOnly": "npm run build"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"jose": "^6.1.0"
|
|
23
|
+
}
|
|
24
|
+
}
|