@adonis-agora/authkit-poppy 0.0.0-stage → 0.3.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/CHANGELOG.md +9 -0
- package/LICENSE +21 -0
- package/README.md +40 -2
- package/build/configure.d.ts +3 -0
- package/build/configure.js +43 -0
- package/build/index.d.ts +20 -0
- package/build/index.js +18 -0
- package/build/src/augmentations.d.ts +1 -0
- package/build/src/augmentations.js +1 -0
- package/build/src/client_registry.d.ts +50 -0
- package/build/src/client_registry.js +260 -0
- package/build/src/config.d.ts +396 -0
- package/build/src/config.js +228 -0
- package/build/src/controllers/poppy_consent_controller.d.ts +19 -0
- package/build/src/controllers/poppy_consent_controller.js +194 -0
- package/build/src/controllers/poppy_controller.d.ts +33 -0
- package/build/src/controllers/poppy_controller.js +219 -0
- package/build/src/dpop.d.ts +61 -0
- package/build/src/dpop.js +158 -0
- package/build/src/email_code_sign_in.d.ts +40 -0
- package/build/src/email_code_sign_in.js +142 -0
- package/build/src/errors.d.ts +25 -0
- package/build/src/errors.js +25 -0
- package/build/src/extension.d.ts +37 -0
- package/build/src/extension.js +167 -0
- package/build/src/messages.d.ts +20 -0
- package/build/src/messages.js +22 -0
- package/build/src/redirect_exact.d.ts +6 -0
- package/build/src/redirect_exact.js +11 -0
- package/build/src/replay.d.ts +25 -0
- package/build/src/replay.js +106 -0
- package/build/src/resource.d.ts +100 -0
- package/build/src/resource.js +122 -0
- package/build/src/runtime.d.ts +8 -0
- package/build/src/runtime.js +15 -0
- package/build/src/safe_fetch.d.ts +48 -0
- package/build/src/safe_fetch.js +262 -0
- package/build/src/service.d.ts +301 -0
- package/build/src/service.js +1488 -0
- package/build/src/session_jwt.d.ts +30 -0
- package/build/src/session_jwt.js +133 -0
- package/build/src/store.d.ts +106 -0
- package/build/src/store.js +261 -0
- package/build/src/tables.d.ts +27 -0
- package/build/src/tables.js +156 -0
- package/build/src/web_session.d.ts +43 -0
- package/build/src/web_session.js +120 -0
- package/package.json +70 -3
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tabelas LIB-OWNED do Poppy — os mesmos nomes e colunas de quando o Poppy morava no
|
|
3
|
+
* `@adonis-agora/authkit-server` (`ensureAuthkitSchema`): um app que já as tem não migra nada.
|
|
4
|
+
* Criadas no boot junto com as do authkit (`schema.autoManage`), ou numa migration com
|
|
5
|
+
* {@link ensurePoppySchema}.
|
|
6
|
+
*/
|
|
7
|
+
import { ensureAuthkitTables } from '@adonis-agora/authkit-server';
|
|
8
|
+
export const POPPY_TABLES = [
|
|
9
|
+
/*
|
|
10
|
+
* Os refresh tokens são grants do ledger do authkit (`auth_agent_grants`, prefixo `pgrant_`)
|
|
11
|
+
* com o hash em `auth_agent_refresh_tokens`; aqui ficam Sessions, access tokens, pedidos de
|
|
12
|
+
* sign-in e os `jti` vistos. Datas com `useTz` e precisão de ms, como as do authkit.
|
|
13
|
+
*/
|
|
14
|
+
{
|
|
15
|
+
name: 'auth_poppy_sessions',
|
|
16
|
+
/**
|
|
17
|
+
* Uma Session: um usuário do agente (`user_id`, opaco) num agente (`client_id`), com o
|
|
18
|
+
* `agent_id` opcional. `account_id` é a conta que já usou. `grant_id` e `scope` ficaram da
|
|
19
|
+
* Draft 0.1, sem uso (o schema só é aditivo).
|
|
20
|
+
*/
|
|
21
|
+
create: (t) => {
|
|
22
|
+
t.string('id').primary();
|
|
23
|
+
t.string('client_id', 2048).notNullable();
|
|
24
|
+
t.string('user_id').notNullable();
|
|
25
|
+
t.string('agent_id').nullable();
|
|
26
|
+
t.string('account_id').nullable().index();
|
|
27
|
+
t.string('grant_id').nullable().index();
|
|
28
|
+
t.text('scope').notNullable();
|
|
29
|
+
t.dateTime('expires_at', { useTz: true, precision: 3 }).notNullable();
|
|
30
|
+
t.dateTime('ended_at', { useTz: true, precision: 3 }).nullable();
|
|
31
|
+
t.dateTime('created_at', { useTz: true, precision: 3 }).notNullable();
|
|
32
|
+
t.dateTime('updated_at', { useTz: true, precision: 3 }).notNullable();
|
|
33
|
+
},
|
|
34
|
+
columns: {
|
|
35
|
+
client_id: (t) => t.string('client_id', 2048),
|
|
36
|
+
user_id: (t) => t.string('user_id'),
|
|
37
|
+
agent_id: (t) => t.string('agent_id').nullable(),
|
|
38
|
+
account_id: (t) => t.string('account_id').nullable().index(),
|
|
39
|
+
grant_id: (t) => t.string('grant_id').nullable().index(),
|
|
40
|
+
scope: (t) => t.text('scope'),
|
|
41
|
+
expires_at: (t) => t.dateTime('expires_at', { useTz: true, precision: 3 }).nullable(),
|
|
42
|
+
ended_at: (t) => t.dateTime('ended_at', { useTz: true, precision: 3 }).nullable(),
|
|
43
|
+
created_at: (t) => t.dateTime('created_at', { useTz: true, precision: 3 }).nullable(),
|
|
44
|
+
updated_at: (t) => t.dateTime('updated_at', { useTz: true, precision: 3 }).nullable(),
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'auth_poppy_tokens',
|
|
49
|
+
/**
|
|
50
|
+
* Access tokens — só o hash. `jkt` = chave DPoP; `null` = Bearer. `session_id` e `user_id`
|
|
51
|
+
* ficaram da Draft 0.1 e saem vazios: o sign-in não conhece a Session.
|
|
52
|
+
*/
|
|
53
|
+
create: (t) => {
|
|
54
|
+
t.string('token_hash', 64).primary();
|
|
55
|
+
t.string('session_id').notNullable().index();
|
|
56
|
+
t.string('client_id', 2048).notNullable();
|
|
57
|
+
t.string('user_id').notNullable();
|
|
58
|
+
t.string('account_id').nullable();
|
|
59
|
+
t.string('grant_id').nullable().index();
|
|
60
|
+
t.text('scope').notNullable();
|
|
61
|
+
t.string('resource', 2048).nullable();
|
|
62
|
+
t.string('jkt', 64).nullable();
|
|
63
|
+
t.dateTime('expires_at', { useTz: true, precision: 3 }).notNullable().index();
|
|
64
|
+
t.dateTime('created_at', { useTz: true, precision: 3 }).notNullable();
|
|
65
|
+
},
|
|
66
|
+
columns: {
|
|
67
|
+
session_id: (t) => t.string('session_id').index(),
|
|
68
|
+
client_id: (t) => t.string('client_id', 2048),
|
|
69
|
+
user_id: (t) => t.string('user_id'),
|
|
70
|
+
account_id: (t) => t.string('account_id').nullable(),
|
|
71
|
+
grant_id: (t) => t.string('grant_id').nullable().index(),
|
|
72
|
+
scope: (t) => t.text('scope'),
|
|
73
|
+
resource: (t) => t.string('resource', 2048).nullable(),
|
|
74
|
+
jkt: (t) => t.string('jkt', 64).nullable(),
|
|
75
|
+
expires_at: (t) => t.dateTime('expires_at', { useTz: true, precision: 3 }).nullable(),
|
|
76
|
+
created_at: (t) => t.dateTime('created_at', { useTz: true, precision: 3 }).nullable(),
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'auth_poppy_requests',
|
|
81
|
+
/**
|
|
82
|
+
* Pedidos: `authorize` (Direct — vira código após o consentimento), `device` (RFC 8628),
|
|
83
|
+
* `mediated` (aguardando o código de uso único) e `browser` (entrada de um navegador, §6).
|
|
84
|
+
* Códigos só como hash. Linhas expiradas são apagadas no próximo pedido.
|
|
85
|
+
*/
|
|
86
|
+
create: (t) => {
|
|
87
|
+
t.string('id').primary();
|
|
88
|
+
t.string('kind', 16).notNullable();
|
|
89
|
+
t.string('code_hash', 64).nullable().unique();
|
|
90
|
+
t.string('user_code', 16).nullable().unique();
|
|
91
|
+
t.string('client_id', 2048).notNullable();
|
|
92
|
+
t.string('session_id').nullable();
|
|
93
|
+
t.string('account_id').nullable();
|
|
94
|
+
t.text('requested_scope').notNullable();
|
|
95
|
+
t.text('granted_scope').nullable();
|
|
96
|
+
t.string('redirect_uri', 2048).nullable();
|
|
97
|
+
t.string('code_challenge', 128).nullable();
|
|
98
|
+
t.string('status', 16).notNullable();
|
|
99
|
+
t.integer('attempts').notNullable().defaultTo(0);
|
|
100
|
+
t.integer('interval_seconds').nullable();
|
|
101
|
+
t.dateTime('last_polled_at', { useTz: true, precision: 3 }).nullable();
|
|
102
|
+
t.text('data').nullable();
|
|
103
|
+
t.dateTime('expires_at', { useTz: true, precision: 3 }).notNullable().index();
|
|
104
|
+
t.dateTime('created_at', { useTz: true, precision: 3 }).notNullable();
|
|
105
|
+
},
|
|
106
|
+
columns: {
|
|
107
|
+
kind: (t) => t.string('kind', 16),
|
|
108
|
+
code_hash: (t) => t.string('code_hash', 64).nullable(),
|
|
109
|
+
user_code: (t) => t.string('user_code', 16).nullable(),
|
|
110
|
+
client_id: (t) => t.string('client_id', 2048),
|
|
111
|
+
session_id: (t) => t.string('session_id').nullable(),
|
|
112
|
+
account_id: (t) => t.string('account_id').nullable(),
|
|
113
|
+
requested_scope: (t) => t.text('requested_scope'),
|
|
114
|
+
granted_scope: (t) => t.text('granted_scope').nullable(),
|
|
115
|
+
redirect_uri: (t) => t.string('redirect_uri', 2048).nullable(),
|
|
116
|
+
code_challenge: (t) => t.string('code_challenge', 128).nullable(),
|
|
117
|
+
status: (t) => t.string('status', 16),
|
|
118
|
+
attempts: (t) => t.integer('attempts').defaultTo(0),
|
|
119
|
+
interval_seconds: (t) => t.integer('interval_seconds').nullable(),
|
|
120
|
+
last_polled_at: (t) => t.dateTime('last_polled_at', { useTz: true, precision: 3 }).nullable(),
|
|
121
|
+
data: (t) => t.text('data').nullable(),
|
|
122
|
+
expires_at: (t) => t.dateTime('expires_at', { useTz: true, precision: 3 }).nullable(),
|
|
123
|
+
created_at: (t) => t.dateTime('created_at', { useTz: true, precision: 3 }).nullable(),
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: 'auth_poppy_jtis',
|
|
128
|
+
/** `jti` já aceitos (client assertions, Session JWTs, provas DPoP), até expirarem — anti-replay entre instâncias. */
|
|
129
|
+
create: (t) => {
|
|
130
|
+
t.string('key', 100).primary();
|
|
131
|
+
t.dateTime('expires_at', { useTz: true, precision: 3 }).notNullable().index();
|
|
132
|
+
},
|
|
133
|
+
columns: {
|
|
134
|
+
expires_at: (t) => t.dateTime('expires_at', { useTz: true, precision: 3 }).nullable(),
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
];
|
|
138
|
+
/**
|
|
139
|
+
* Garante as tabelas do Poppy — aditivo e idempotente, como `ensureAuthkitSchema`. Para hosts que
|
|
140
|
+
* desligam `schema.autoManage` e gerenciam o schema em migrations:
|
|
141
|
+
*
|
|
142
|
+
* ```ts
|
|
143
|
+
* import { ensureAuthkitSchema } from '@adonis-agora/authkit-server'
|
|
144
|
+
* import { ensurePoppySchema } from '@adonis-agora/authkit-poppy'
|
|
145
|
+
*
|
|
146
|
+
* export default class extends BaseSchema {
|
|
147
|
+
* async up() {
|
|
148
|
+
* await ensureAuthkitSchema(this.db)
|
|
149
|
+
* await ensurePoppySchema(this.db)
|
|
150
|
+
* }
|
|
151
|
+
* }
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
export function ensurePoppySchema(db, options = {}) {
|
|
155
|
+
return ensureAuthkitTables(db, POPPY_TABLES, options);
|
|
156
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { HttpContext } from '@adonisjs/core/http';
|
|
2
|
+
import type { PoppyBrowserJoin, PoppyService, PoppySessionState } from './service.js';
|
|
3
|
+
/**
|
|
4
|
+
* Session key que marca a sessão do navegador de um personal agent Poppy (§6): o console de conta,
|
|
5
|
+
* o admin e as telas de consentimento recusam essa sessão (`isAgentBrowser`). O mesmo valor de
|
|
6
|
+
* quando o Poppy morava no authkit-server — sessões abertas continuam valendo.
|
|
7
|
+
*/
|
|
8
|
+
export declare const POPPY_WEB_SESSION_KEY = "authkit_poppy_session";
|
|
9
|
+
/** A sessão é do navegador de um personal agent Poppy? */
|
|
10
|
+
export declare function isPoppyBrowser(ctx: HttpContext): boolean;
|
|
11
|
+
export interface PoppyWebSessionMarker {
|
|
12
|
+
sessionId: string;
|
|
13
|
+
clientId: string;
|
|
14
|
+
userId: string;
|
|
15
|
+
/** Conta, grant e scopes autorizados na entrada (§6, passo 2); `null` = entrada deslogada. */
|
|
16
|
+
accountId: string | null;
|
|
17
|
+
grantId: string | null;
|
|
18
|
+
scopes: string[];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Liga o navegador à Session (§6, passo 3): regenera a sessão do app (session fixation) e a marca
|
|
22
|
+
* como do agente. Uma entrada com access token faz o login na conta autorizada, no lugar de qualquer
|
|
23
|
+
* outro, com o mecanismo do app — o hook `web.login`, ou a sessão de conta do authkit +
|
|
24
|
+
* `adonisAuth.guard`. Uma entrada sem access token não mexe no login do navegador — a não ser que
|
|
25
|
+
* uma entrada anterior o tenha logado: aí o sign-in dela termina aqui.
|
|
26
|
+
*/
|
|
27
|
+
export declare function loginPoppyBrowser(httpCtx: HttpContext, poppy: PoppyService, result: PoppyBrowserJoin): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Estado da Session Poppy deste navegador (preenchido por {@link poppyWebSession}).
|
|
30
|
+
*
|
|
31
|
+
* @experimental Poppy (Personal Agent Protocol) Draft 0.3 — acompanha a spec em desenvolvimento e PODE MUDAR
|
|
32
|
+
* de forma incompatível fora de majors enquanto ela for draft.
|
|
33
|
+
*/
|
|
34
|
+
export declare function poppyWebSessionOf(ctx: HttpContext): PoppySessionState | null;
|
|
35
|
+
/**
|
|
36
|
+
* Middleware do site: o cookie age pela conta e pelos scopes autorizados na entrada e deixa de agir
|
|
37
|
+
* quando o sign-in termina (sign-out, agente desconectado); não sobrevive à Session (§6). Um login
|
|
38
|
+
* antigo não volta. Coloque-o depois do middleware de sessão.
|
|
39
|
+
*
|
|
40
|
+
* @experimental Poppy (Personal Agent Protocol) Draft 0.3 — acompanha a spec em desenvolvimento e PODE MUDAR
|
|
41
|
+
* de forma incompatível fora de majors enquanto ela for draft.
|
|
42
|
+
*/
|
|
43
|
+
export declare function poppyWebSession(): (httpCtx: HttpContext, next: () => Promise<void>) => Promise<void>;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* O cookie do site para o navegador de um personal agent (§6): a entrada na Session, e o
|
|
3
|
+
* acompanhamento do acesso à conta autorizado nela a cada request.
|
|
4
|
+
*/
|
|
5
|
+
import { ACCOUNT_SESSION_KEY, signInAccountSession, signOutAccountSession, } from '@adonis-agora/authkit-server';
|
|
6
|
+
import { poppyFor } from './runtime.js';
|
|
7
|
+
/**
|
|
8
|
+
* Session key que marca a sessão do navegador de um personal agent Poppy (§6): o console de conta,
|
|
9
|
+
* o admin e as telas de consentimento recusam essa sessão (`isAgentBrowser`). O mesmo valor de
|
|
10
|
+
* quando o Poppy morava no authkit-server — sessões abertas continuam valendo.
|
|
11
|
+
*/
|
|
12
|
+
export const POPPY_WEB_SESSION_KEY = 'authkit_poppy_session';
|
|
13
|
+
/** A sessão é do navegador de um personal agent Poppy? */
|
|
14
|
+
export function isPoppyBrowser(ctx) {
|
|
15
|
+
const marker = ctx.session?.get?.(POPPY_WEB_SESSION_KEY);
|
|
16
|
+
return typeof marker === 'object' && marker !== null && typeof marker.sessionId === 'string';
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Liga o navegador à Session (§6, passo 3): regenera a sessão do app (session fixation) e a marca
|
|
20
|
+
* como do agente. Uma entrada com access token faz o login na conta autorizada, no lugar de qualquer
|
|
21
|
+
* outro, com o mecanismo do app — o hook `web.login`, ou a sessão de conta do authkit +
|
|
22
|
+
* `adonisAuth.guard`. Uma entrada sem access token não mexe no login do navegador — a não ser que
|
|
23
|
+
* uma entrada anterior o tenha logado: aí o sign-in dela termina aqui.
|
|
24
|
+
*/
|
|
25
|
+
export async function loginPoppyBrowser(httpCtx, poppy, result) {
|
|
26
|
+
// Sem augmentation no barrel: a sessão é lida sem tipo.
|
|
27
|
+
const ctx = httpCtx;
|
|
28
|
+
const login = poppy.cfg.web?.login;
|
|
29
|
+
const previous = ctx.session.get(POPPY_WEB_SESSION_KEY);
|
|
30
|
+
await ctx.session.regenerate();
|
|
31
|
+
const marker = {
|
|
32
|
+
sessionId: result.sessionId,
|
|
33
|
+
clientId: result.clientId,
|
|
34
|
+
userId: result.userId,
|
|
35
|
+
accountId: result.accountId,
|
|
36
|
+
grantId: result.grantId,
|
|
37
|
+
scopes: result.scopes,
|
|
38
|
+
};
|
|
39
|
+
ctx.session.put(POPPY_WEB_SESSION_KEY, marker);
|
|
40
|
+
if (login) {
|
|
41
|
+
await login(ctx, {
|
|
42
|
+
sessionId: result.sessionId,
|
|
43
|
+
clientId: result.clientId,
|
|
44
|
+
userId: result.userId,
|
|
45
|
+
accountId: result.accountId,
|
|
46
|
+
scopes: result.scopes,
|
|
47
|
+
});
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if (result.accountId) {
|
|
51
|
+
await signInAccountSession(ctx, result.accountId);
|
|
52
|
+
}
|
|
53
|
+
else if (previous?.accountId) {
|
|
54
|
+
await signOutAccountSession(ctx);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
const states = new WeakMap();
|
|
58
|
+
/**
|
|
59
|
+
* Estado da Session Poppy deste navegador (preenchido por {@link poppyWebSession}).
|
|
60
|
+
*
|
|
61
|
+
* @experimental Poppy (Personal Agent Protocol) Draft 0.3 — acompanha a spec em desenvolvimento e PODE MUDAR
|
|
62
|
+
* de forma incompatível fora de majors enquanto ela for draft.
|
|
63
|
+
*/
|
|
64
|
+
export function poppyWebSessionOf(ctx) {
|
|
65
|
+
return states.get(ctx) ?? null;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Middleware do site: o cookie age pela conta e pelos scopes autorizados na entrada e deixa de agir
|
|
69
|
+
* quando o sign-in termina (sign-out, agente desconectado); não sobrevive à Session (§6). Um login
|
|
70
|
+
* antigo não volta. Coloque-o depois do middleware de sessão.
|
|
71
|
+
*
|
|
72
|
+
* @experimental Poppy (Personal Agent Protocol) Draft 0.3 — acompanha a spec em desenvolvimento e PODE MUDAR
|
|
73
|
+
* de forma incompatível fora de majors enquanto ela for draft.
|
|
74
|
+
*/
|
|
75
|
+
export function poppyWebSession() {
|
|
76
|
+
return async (httpCtx, next) => {
|
|
77
|
+
const ctx = httpCtx;
|
|
78
|
+
const marker = ctx.session?.get(POPPY_WEB_SESSION_KEY);
|
|
79
|
+
if (!marker?.sessionId)
|
|
80
|
+
return next();
|
|
81
|
+
const poppy = await poppyFor(ctx);
|
|
82
|
+
const state = poppy ? await poppy.browserState(marker) : null;
|
|
83
|
+
const login = poppy?.cfg.web?.login;
|
|
84
|
+
if (!state?.active || state.clientId !== marker.clientId) {
|
|
85
|
+
// A Session terminou: o cookie também — e o login dela, não o do próprio navegador.
|
|
86
|
+
ctx.session.forget(POPPY_WEB_SESSION_KEY);
|
|
87
|
+
if (marker.accountId)
|
|
88
|
+
await signOutAccountSession(ctx);
|
|
89
|
+
await ctx.session.regenerate();
|
|
90
|
+
return next();
|
|
91
|
+
}
|
|
92
|
+
states.set(ctx, state);
|
|
93
|
+
if (login) {
|
|
94
|
+
await login(ctx, {
|
|
95
|
+
sessionId: state.sessionId,
|
|
96
|
+
clientId: state.clientId,
|
|
97
|
+
userId: state.userId,
|
|
98
|
+
accountId: state.accountId,
|
|
99
|
+
scopes: state.scopes,
|
|
100
|
+
});
|
|
101
|
+
return next();
|
|
102
|
+
}
|
|
103
|
+
const current = ctx.session.get(ACCOUNT_SESSION_KEY);
|
|
104
|
+
if (state.signedIn && state.accountId) {
|
|
105
|
+
if (current !== state.accountId)
|
|
106
|
+
await signInAccountSession(ctx, state.accountId);
|
|
107
|
+
}
|
|
108
|
+
else if (marker.accountId) {
|
|
109
|
+
// O sign-in da entrada terminou: o navegador sai, e a Session segue deslogada.
|
|
110
|
+
ctx.session.put(POPPY_WEB_SESSION_KEY, {
|
|
111
|
+
...marker,
|
|
112
|
+
accountId: null,
|
|
113
|
+
grantId: null,
|
|
114
|
+
scopes: [],
|
|
115
|
+
});
|
|
116
|
+
await signOutAccountSession(ctx);
|
|
117
|
+
}
|
|
118
|
+
return next();
|
|
119
|
+
};
|
|
120
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,73 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adonis-agora/authkit-poppy",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Personal Agent Protocol (\"Poppy\") for AuthKit: discovery, signed Poppy-Session agent sessions, Direct/Device/Mediated sign-in, MCP and browser sessions — an optional extension of @adonis-agora/authkit-server.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "dudousxd",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/DavideCarvalho/adonis-agora-authkit.git",
|
|
10
|
+
"directory": "packages/authkit-poppy"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://davidecarvalho.github.io/agora/docs/authkit/personal-agents-poppy",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/DavideCarvalho/adonis-agora-authkit/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"adonisjs",
|
|
18
|
+
"authkit",
|
|
19
|
+
"personal-agents",
|
|
20
|
+
"poppy",
|
|
21
|
+
"personal-agent-protocol",
|
|
22
|
+
"oauth2",
|
|
23
|
+
"dpop"
|
|
24
|
+
],
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public"
|
|
27
|
+
},
|
|
28
|
+
"type": "module",
|
|
29
|
+
"main": "./build/index.js",
|
|
30
|
+
"types": "./build/index.d.ts",
|
|
31
|
+
"files": [
|
|
32
|
+
"build",
|
|
33
|
+
"CHANGELOG.md"
|
|
34
|
+
],
|
|
35
|
+
"exports": {
|
|
36
|
+
".": "./build/index.js",
|
|
37
|
+
"./types": "./build/index.js"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=24"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"@adonis-agora/authkit-server": "^1.0.0-rc.2",
|
|
44
|
+
"@adonisjs/core": "^7.5.0",
|
|
45
|
+
"@adonisjs/session": "^8.1.0",
|
|
46
|
+
"@adonisjs/shield": "^9.0.0"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"jose": "6.2.15"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@adonis-agora/authkit-server": "1.0.0-rc.2",
|
|
53
|
+
"@adonisjs/core": "7.6.0",
|
|
54
|
+
"@adonisjs/lucid": "22.4.2",
|
|
55
|
+
"@adonisjs/session": "8.3.0",
|
|
56
|
+
"@adonisjs/shield": "9.0.0",
|
|
57
|
+
"@adonisjs/tsconfig": "2.0.0",
|
|
58
|
+
"@japa/assert": "4.2.0",
|
|
59
|
+
"@japa/runner": "5.4.0",
|
|
60
|
+
"@poppinss/ts-exec": "1.5.2",
|
|
61
|
+
"@types/ioredis-mock": "8.2.8",
|
|
62
|
+
"@types/node": "26.6.6",
|
|
63
|
+
"better-sqlite3": "13.0.3",
|
|
64
|
+
"ioredis-mock": "8.13.1",
|
|
65
|
+
"luxon": "3.7.2",
|
|
66
|
+
"typescript": "7.0.2"
|
|
67
|
+
},
|
|
68
|
+
"scripts": {
|
|
69
|
+
"build": "node -e \"require('node:fs').rmSync('build',{recursive:true,force:true})\" && tsc",
|
|
70
|
+
"typecheck": "tsc --noEmit && tsc -p tsconfig.tests.json",
|
|
71
|
+
"test": "node --import=@poppinss/ts-exec bin/test.ts"
|
|
72
|
+
}
|
|
6
73
|
}
|