@adakrpos/auth 0.0.1

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.
@@ -0,0 +1,173 @@
1
+ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
2
+ import { Hono } from "hono";
3
+
4
+ import { clearApiKeyCache } from "../src/cache";
5
+ import { adakrposAuth, getAuth, requireAuth } from "../src/hono";
6
+
7
+ const config = {
8
+ apiKey: "ak_test",
9
+ authUrl: "https://example.com",
10
+ };
11
+
12
+ const validSession = {
13
+ user: {
14
+ id: "user_123",
15
+ email: "user@example.com",
16
+ verifiedEmail: "verified@example.com",
17
+ nickname: "ada",
18
+ name: "Ada Lovelace",
19
+ profilePhotoUrl: null,
20
+ bio: null,
21
+ contact: null,
22
+ snsLinks: {},
23
+ isVerified: true,
24
+ createdAt: 1,
25
+ updatedAt: 2,
26
+ },
27
+ session: {
28
+ id: "session_123",
29
+ userId: "user_123",
30
+ expiresAt: 10,
31
+ createdAt: 5,
32
+ },
33
+ };
34
+
35
+ describe("Hono middleware", () => {
36
+ beforeEach(() => {
37
+ clearApiKeyCache();
38
+ });
39
+
40
+ afterEach(() => {
41
+ clearApiKeyCache();
42
+ vi.restoreAllMocks();
43
+ });
44
+
45
+ it("sets the auth function on context", async () => {
46
+ const app = new Hono();
47
+
48
+ app.use("*", adakrposAuth(config));
49
+ app.get("/", (c) => c.json({ hasAuth: typeof c.get("auth") === "function" }));
50
+
51
+ const response = await app.request("http://localhost/");
52
+
53
+ expect(response.status).toBe(200);
54
+ expect(await response.json()).toEqual({ hasAuth: true });
55
+ });
56
+
57
+ it("returns an unauthenticated context when no session cookie is present", async () => {
58
+ const fetchSpy = vi.spyOn(global, "fetch");
59
+ const app = new Hono();
60
+
61
+ app.use("*", adakrposAuth(config));
62
+ app.get("/", async (c) => c.json(await getAuth(c)));
63
+
64
+ const response = await app.request("http://localhost/");
65
+
66
+ expect(response.status).toBe(200);
67
+ expect(await response.json()).toEqual({
68
+ user: null,
69
+ session: null,
70
+ isAuthenticated: false,
71
+ });
72
+ expect(fetchSpy).not.toHaveBeenCalled();
73
+ });
74
+
75
+ it("returns an authenticated context when the session is valid", async () => {
76
+ const fetchSpy = vi.spyOn(global, "fetch").mockResolvedValue(
77
+ new Response(JSON.stringify(validSession), { status: 200 }),
78
+ );
79
+ const app = new Hono();
80
+
81
+ app.use("*", adakrposAuth(config));
82
+ app.get("/", async (c) => c.json(await getAuth(c)));
83
+
84
+ const response = await app.request("http://localhost/", {
85
+ headers: { Cookie: "adakrpos_session=session_123" },
86
+ });
87
+
88
+ expect(response.status).toBe(200);
89
+ expect(await response.json()).toEqual({
90
+ ...validSession,
91
+ isAuthenticated: true,
92
+ });
93
+ expect(fetchSpy).toHaveBeenCalledWith(
94
+ "https://example.com/api/sdk/verify-session",
95
+ expect.objectContaining({
96
+ method: "POST",
97
+ body: JSON.stringify({ sessionId: "session_123" }),
98
+ }),
99
+ );
100
+ });
101
+
102
+ it("returns 401 when auth is required and no session exists", async () => {
103
+ const app = new Hono();
104
+
105
+ app.use("*", requireAuth(config));
106
+ app.get("/", (c) => c.text("ok"));
107
+
108
+ const response = await app.request("http://localhost/");
109
+
110
+ expect(response.status).toBe(401);
111
+ expect(await response.json()).toEqual({ error: "Unauthorized" });
112
+ });
113
+
114
+ it("allows authenticated requests through requireAuth", async () => {
115
+ const fetchSpy = vi.spyOn(global, "fetch").mockResolvedValue(
116
+ new Response(JSON.stringify(validSession), { status: 200 }),
117
+ );
118
+ const app = new Hono();
119
+
120
+ app.use("*", requireAuth(config));
121
+ app.get("/", async (c) => c.json(await getAuth(c)));
122
+
123
+ const response = await app.request("http://localhost/", {
124
+ headers: { Cookie: "adakrpos_session=session_123" },
125
+ });
126
+
127
+ expect(response.status).toBe(200);
128
+ expect(await response.json()).toEqual({
129
+ ...validSession,
130
+ isAuthenticated: true,
131
+ });
132
+ expect(fetchSpy).toHaveBeenCalledTimes(1);
133
+ });
134
+
135
+ it("does not call the auth server until getAuth is invoked", async () => {
136
+ const fetchSpy = vi.spyOn(global, "fetch").mockResolvedValue(
137
+ new Response(JSON.stringify(validSession), { status: 200 }),
138
+ );
139
+ const app = new Hono();
140
+
141
+ app.use("*", adakrposAuth(config));
142
+ app.get("/", (c) => c.text("ok"));
143
+
144
+ const response = await app.request("http://localhost/", {
145
+ headers: { Cookie: "adakrpos_session=session_123" },
146
+ });
147
+
148
+ expect(response.status).toBe(200);
149
+ expect(await response.text()).toBe("ok");
150
+ expect(fetchSpy).not.toHaveBeenCalled();
151
+ });
152
+
153
+ it("calls the auth server when getAuth is invoked", async () => {
154
+ const fetchSpy = vi.spyOn(global, "fetch").mockResolvedValue(
155
+ new Response(JSON.stringify(validSession), { status: 200 }),
156
+ );
157
+ const app = new Hono();
158
+
159
+ app.use("*", adakrposAuth(config));
160
+ app.get("/", async (c) => {
161
+ await getAuth(c);
162
+ return c.text("ok");
163
+ });
164
+
165
+ const response = await app.request("http://localhost/", {
166
+ headers: { Cookie: "adakrpos_session=session_123" },
167
+ });
168
+
169
+ expect(response.status).toBe(200);
170
+ expect(await response.text()).toBe("ok");
171
+ expect(fetchSpy).toHaveBeenCalledTimes(1);
172
+ });
173
+ });
@@ -0,0 +1,64 @@
1
+ interface AdakrposUser {
2
+ id: string;
3
+ email: string | null;
4
+ verifiedEmail: string | null;
5
+ nickname: string | null;
6
+ name: string | null;
7
+ profilePhotoUrl: string | null;
8
+ bio: string | null;
9
+ contact: string | null;
10
+ snsLinks: Record<string, string>;
11
+ isVerified: boolean;
12
+ createdAt: number;
13
+ updatedAt: number;
14
+ }
15
+ interface AdakrposSession {
16
+ id: string;
17
+ userId: string;
18
+ expiresAt: number;
19
+ createdAt: number;
20
+ }
21
+ interface AdakrposAuthContext {
22
+ user: AdakrposUser;
23
+ session: AdakrposSession;
24
+ isAuthenticated: true;
25
+ }
26
+ interface AdakrposUnauthContext {
27
+ user: null;
28
+ session: null;
29
+ isAuthenticated: false;
30
+ }
31
+ type AuthContext = AdakrposAuthContext | AdakrposUnauthContext;
32
+ interface DeveloperApp {
33
+ id: string;
34
+ userId: string;
35
+ name: string;
36
+ description: string | null;
37
+ apiKeyPrefix: string;
38
+ redirectUrls: string[];
39
+ isActive: boolean;
40
+ createdAt: number;
41
+ updatedAt: number;
42
+ }
43
+ interface ApiKeyInfo {
44
+ appId: string;
45
+ userId: string;
46
+ prefix: string;
47
+ isActive: boolean;
48
+ }
49
+
50
+ interface AdakrposAuthConfig {
51
+ apiKey: string;
52
+ authUrl?: string;
53
+ }
54
+ interface AdakrposAuthClient {
55
+ verifySession(sessionId: string): Promise<{
56
+ user: AdakrposUser;
57
+ session: AdakrposSession;
58
+ } | null>;
59
+ getUser(userId: string): Promise<AdakrposUser | null>;
60
+ getCurrentUser(sessionId: string): Promise<AdakrposUser | null>;
61
+ }
62
+ declare function createAdakrposAuth(config: AdakrposAuthConfig): AdakrposAuthClient;
63
+
64
+ export { type AuthContext as A, type DeveloperApp as D, type AdakrposAuthConfig as a, type AdakrposAuthClient as b, type AdakrposAuthContext as c, type AdakrposSession as d, type AdakrposUnauthContext as e, type AdakrposUser as f, type ApiKeyInfo as g, createAdakrposAuth as h };
@@ -0,0 +1,64 @@
1
+ interface AdakrposUser {
2
+ id: string;
3
+ email: string | null;
4
+ verifiedEmail: string | null;
5
+ nickname: string | null;
6
+ name: string | null;
7
+ profilePhotoUrl: string | null;
8
+ bio: string | null;
9
+ contact: string | null;
10
+ snsLinks: Record<string, string>;
11
+ isVerified: boolean;
12
+ createdAt: number;
13
+ updatedAt: number;
14
+ }
15
+ interface AdakrposSession {
16
+ id: string;
17
+ userId: string;
18
+ expiresAt: number;
19
+ createdAt: number;
20
+ }
21
+ interface AdakrposAuthContext {
22
+ user: AdakrposUser;
23
+ session: AdakrposSession;
24
+ isAuthenticated: true;
25
+ }
26
+ interface AdakrposUnauthContext {
27
+ user: null;
28
+ session: null;
29
+ isAuthenticated: false;
30
+ }
31
+ type AuthContext = AdakrposAuthContext | AdakrposUnauthContext;
32
+ interface DeveloperApp {
33
+ id: string;
34
+ userId: string;
35
+ name: string;
36
+ description: string | null;
37
+ apiKeyPrefix: string;
38
+ redirectUrls: string[];
39
+ isActive: boolean;
40
+ createdAt: number;
41
+ updatedAt: number;
42
+ }
43
+ interface ApiKeyInfo {
44
+ appId: string;
45
+ userId: string;
46
+ prefix: string;
47
+ isActive: boolean;
48
+ }
49
+
50
+ interface AdakrposAuthConfig {
51
+ apiKey: string;
52
+ authUrl?: string;
53
+ }
54
+ interface AdakrposAuthClient {
55
+ verifySession(sessionId: string): Promise<{
56
+ user: AdakrposUser;
57
+ session: AdakrposSession;
58
+ } | null>;
59
+ getUser(userId: string): Promise<AdakrposUser | null>;
60
+ getCurrentUser(sessionId: string): Promise<AdakrposUser | null>;
61
+ }
62
+ declare function createAdakrposAuth(config: AdakrposAuthConfig): AdakrposAuthClient;
63
+
64
+ export { type AuthContext as A, type DeveloperApp as D, type AdakrposAuthConfig as a, type AdakrposAuthClient as b, type AdakrposAuthContext as c, type AdakrposSession as d, type AdakrposUnauthContext as e, type AdakrposUser as f, type ApiKeyInfo as g, createAdakrposAuth as h };
@@ -0,0 +1,13 @@
1
+ import { A as AuthContext, a as AdakrposAuthConfig } from './client-Dd5DjxzG.mjs';
2
+
3
+ declare global {
4
+ namespace Express {
5
+ interface Request {
6
+ auth?: () => Promise<AuthContext>;
7
+ }
8
+ }
9
+ }
10
+ declare function adakrposAuthExpress(config: AdakrposAuthConfig): (req: any, res: any, next: any) => Promise<void>;
11
+ declare function requireAuthExpress(config: AdakrposAuthConfig): (req: any, res: any, next: any) => Promise<any>;
12
+
13
+ export { adakrposAuthExpress, requireAuthExpress };
@@ -0,0 +1,13 @@
1
+ import { A as AuthContext, a as AdakrposAuthConfig } from './client-Dd5DjxzG.js';
2
+
3
+ declare global {
4
+ namespace Express {
5
+ interface Request {
6
+ auth?: () => Promise<AuthContext>;
7
+ }
8
+ }
9
+ }
10
+ declare function adakrposAuthExpress(config: AdakrposAuthConfig): (req: any, res: any, next: any) => Promise<void>;
11
+ declare function requireAuthExpress(config: AdakrposAuthConfig): (req: any, res: any, next: any) => Promise<any>;
12
+
13
+ export { adakrposAuthExpress, requireAuthExpress };
@@ -0,0 +1,173 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/express.ts
21
+ var express_exports = {};
22
+ __export(express_exports, {
23
+ adakrposAuthExpress: () => adakrposAuthExpress,
24
+ requireAuthExpress: () => requireAuthExpress
25
+ });
26
+ module.exports = __toCommonJS(express_exports);
27
+
28
+ // src/cache.ts
29
+ var cache = /* @__PURE__ */ new Map();
30
+ var DEFAULT_CACHE_TTL_MS = 3e4;
31
+ function getCachedApiKeyValidity(apiKey) {
32
+ const entry = cache.get(apiKey);
33
+ if (!entry) {
34
+ return null;
35
+ }
36
+ if (Date.now() > entry.expiresAt) {
37
+ cache.delete(apiKey);
38
+ return null;
39
+ }
40
+ return entry.valid;
41
+ }
42
+ function setCachedApiKeyValidity(apiKey, valid, ttlMs = DEFAULT_CACHE_TTL_MS) {
43
+ cache.set(apiKey, {
44
+ valid,
45
+ expiresAt: Date.now() + ttlMs
46
+ });
47
+ }
48
+
49
+ // src/client.ts
50
+ var DEFAULT_AUTH_URL = "https://ada-kr-pos.com";
51
+ function createUrl(baseUrl, path) {
52
+ return new URL(path, baseUrl.endsWith("/") ? baseUrl : `${baseUrl}/`).toString();
53
+ }
54
+ async function parseJson(response) {
55
+ return await response.json();
56
+ }
57
+ function createAdakrposAuth(config) {
58
+ const baseUrl = config.authUrl ?? DEFAULT_AUTH_URL;
59
+ const apiKey = config.apiKey;
60
+ async function request(path, init, options = {}) {
61
+ if (getCachedApiKeyValidity(apiKey) === false) {
62
+ return null;
63
+ }
64
+ const response = await fetch(createUrl(baseUrl, path), {
65
+ ...init,
66
+ headers: {
67
+ Authorization: `Bearer ${apiKey}`,
68
+ ...init.body ? { "Content-Type": "application/json" } : {},
69
+ ...init.headers
70
+ }
71
+ });
72
+ if (response.status === 401 || response.status === 403) {
73
+ setCachedApiKeyValidity(apiKey, false);
74
+ return null;
75
+ }
76
+ setCachedApiKeyValidity(apiKey, true);
77
+ if (response.status === 404 && options.returnNullOnNotFound) {
78
+ return null;
79
+ }
80
+ if (!response.ok) {
81
+ throw new Error(`Adakrpos auth request failed with status ${response.status}`);
82
+ }
83
+ return parseJson(response);
84
+ }
85
+ return {
86
+ async verifySession(sessionId) {
87
+ return request(
88
+ "/api/sdk/verify-session",
89
+ {
90
+ method: "POST",
91
+ body: JSON.stringify({ sessionId })
92
+ },
93
+ { returnNullOnNotFound: true }
94
+ );
95
+ },
96
+ async getUser(userId) {
97
+ return request(`/api/sdk/users/${encodeURIComponent(userId)}`, {
98
+ method: "GET"
99
+ }, { returnNullOnNotFound: true });
100
+ },
101
+ async getCurrentUser(sessionId) {
102
+ const result = await this.verifySession(sessionId);
103
+ return result?.user ?? null;
104
+ }
105
+ };
106
+ }
107
+
108
+ // src/express.ts
109
+ var UNAUTH_CONTEXT = {
110
+ user: null,
111
+ session: null,
112
+ isAuthenticated: false
113
+ };
114
+ function getSessionId(cookieHeader) {
115
+ const sessionMatch = cookieHeader.match(/(?:^|;\s*)adakrpos_session=([^;]+)/);
116
+ if (!sessionMatch) {
117
+ return null;
118
+ }
119
+ try {
120
+ return decodeURIComponent(sessionMatch[1]);
121
+ } catch {
122
+ return sessionMatch[1];
123
+ }
124
+ }
125
+ function createAuthFn(client, sessionId) {
126
+ let authPromise;
127
+ return async () => {
128
+ if (!authPromise) {
129
+ authPromise = (async () => {
130
+ if (!sessionId) {
131
+ return UNAUTH_CONTEXT;
132
+ }
133
+ const result = await client.verifySession(sessionId);
134
+ if (!result) {
135
+ return UNAUTH_CONTEXT;
136
+ }
137
+ return {
138
+ user: result.user,
139
+ session: result.session,
140
+ isAuthenticated: true
141
+ };
142
+ })();
143
+ }
144
+ return authPromise;
145
+ };
146
+ }
147
+ function adakrposAuthExpress(config) {
148
+ const client = createAdakrposAuth(config);
149
+ return async (req, res, next) => {
150
+ const cookieHeader = req.headers?.cookie ?? "";
151
+ const sessionId = getSessionId(cookieHeader);
152
+ req.auth = createAuthFn(client, sessionId);
153
+ next();
154
+ };
155
+ }
156
+ function requireAuthExpress(config) {
157
+ const client = createAdakrposAuth(config);
158
+ return async (req, res, next) => {
159
+ const cookieHeader = req.headers?.cookie ?? "";
160
+ const sessionId = getSessionId(cookieHeader);
161
+ req.auth = createAuthFn(client, sessionId);
162
+ const auth = await req.auth();
163
+ if (!auth?.isAuthenticated) {
164
+ return res.status(401).json({ error: "Unauthorized" });
165
+ }
166
+ next();
167
+ };
168
+ }
169
+ // Annotate the CommonJS export names for ESM import in node:
170
+ 0 && (module.exports = {
171
+ adakrposAuthExpress,
172
+ requireAuthExpress
173
+ });
@@ -0,0 +1,145 @@
1
+ // src/cache.ts
2
+ var cache = /* @__PURE__ */ new Map();
3
+ var DEFAULT_CACHE_TTL_MS = 3e4;
4
+ function getCachedApiKeyValidity(apiKey) {
5
+ const entry = cache.get(apiKey);
6
+ if (!entry) {
7
+ return null;
8
+ }
9
+ if (Date.now() > entry.expiresAt) {
10
+ cache.delete(apiKey);
11
+ return null;
12
+ }
13
+ return entry.valid;
14
+ }
15
+ function setCachedApiKeyValidity(apiKey, valid, ttlMs = DEFAULT_CACHE_TTL_MS) {
16
+ cache.set(apiKey, {
17
+ valid,
18
+ expiresAt: Date.now() + ttlMs
19
+ });
20
+ }
21
+
22
+ // src/client.ts
23
+ var DEFAULT_AUTH_URL = "https://ada-kr-pos.com";
24
+ function createUrl(baseUrl, path) {
25
+ return new URL(path, baseUrl.endsWith("/") ? baseUrl : `${baseUrl}/`).toString();
26
+ }
27
+ async function parseJson(response) {
28
+ return await response.json();
29
+ }
30
+ function createAdakrposAuth(config) {
31
+ const baseUrl = config.authUrl ?? DEFAULT_AUTH_URL;
32
+ const apiKey = config.apiKey;
33
+ async function request(path, init, options = {}) {
34
+ if (getCachedApiKeyValidity(apiKey) === false) {
35
+ return null;
36
+ }
37
+ const response = await fetch(createUrl(baseUrl, path), {
38
+ ...init,
39
+ headers: {
40
+ Authorization: `Bearer ${apiKey}`,
41
+ ...init.body ? { "Content-Type": "application/json" } : {},
42
+ ...init.headers
43
+ }
44
+ });
45
+ if (response.status === 401 || response.status === 403) {
46
+ setCachedApiKeyValidity(apiKey, false);
47
+ return null;
48
+ }
49
+ setCachedApiKeyValidity(apiKey, true);
50
+ if (response.status === 404 && options.returnNullOnNotFound) {
51
+ return null;
52
+ }
53
+ if (!response.ok) {
54
+ throw new Error(`Adakrpos auth request failed with status ${response.status}`);
55
+ }
56
+ return parseJson(response);
57
+ }
58
+ return {
59
+ async verifySession(sessionId) {
60
+ return request(
61
+ "/api/sdk/verify-session",
62
+ {
63
+ method: "POST",
64
+ body: JSON.stringify({ sessionId })
65
+ },
66
+ { returnNullOnNotFound: true }
67
+ );
68
+ },
69
+ async getUser(userId) {
70
+ return request(`/api/sdk/users/${encodeURIComponent(userId)}`, {
71
+ method: "GET"
72
+ }, { returnNullOnNotFound: true });
73
+ },
74
+ async getCurrentUser(sessionId) {
75
+ const result = await this.verifySession(sessionId);
76
+ return result?.user ?? null;
77
+ }
78
+ };
79
+ }
80
+
81
+ // src/express.ts
82
+ var UNAUTH_CONTEXT = {
83
+ user: null,
84
+ session: null,
85
+ isAuthenticated: false
86
+ };
87
+ function getSessionId(cookieHeader) {
88
+ const sessionMatch = cookieHeader.match(/(?:^|;\s*)adakrpos_session=([^;]+)/);
89
+ if (!sessionMatch) {
90
+ return null;
91
+ }
92
+ try {
93
+ return decodeURIComponent(sessionMatch[1]);
94
+ } catch {
95
+ return sessionMatch[1];
96
+ }
97
+ }
98
+ function createAuthFn(client, sessionId) {
99
+ let authPromise;
100
+ return async () => {
101
+ if (!authPromise) {
102
+ authPromise = (async () => {
103
+ if (!sessionId) {
104
+ return UNAUTH_CONTEXT;
105
+ }
106
+ const result = await client.verifySession(sessionId);
107
+ if (!result) {
108
+ return UNAUTH_CONTEXT;
109
+ }
110
+ return {
111
+ user: result.user,
112
+ session: result.session,
113
+ isAuthenticated: true
114
+ };
115
+ })();
116
+ }
117
+ return authPromise;
118
+ };
119
+ }
120
+ function adakrposAuthExpress(config) {
121
+ const client = createAdakrposAuth(config);
122
+ return async (req, res, next) => {
123
+ const cookieHeader = req.headers?.cookie ?? "";
124
+ const sessionId = getSessionId(cookieHeader);
125
+ req.auth = createAuthFn(client, sessionId);
126
+ next();
127
+ };
128
+ }
129
+ function requireAuthExpress(config) {
130
+ const client = createAdakrposAuth(config);
131
+ return async (req, res, next) => {
132
+ const cookieHeader = req.headers?.cookie ?? "";
133
+ const sessionId = getSessionId(cookieHeader);
134
+ req.auth = createAuthFn(client, sessionId);
135
+ const auth = await req.auth();
136
+ if (!auth?.isAuthenticated) {
137
+ return res.status(401).json({ error: "Unauthorized" });
138
+ }
139
+ next();
140
+ };
141
+ }
142
+ export {
143
+ adakrposAuthExpress,
144
+ requireAuthExpress
145
+ };
@@ -0,0 +1,5 @@
1
+ import { a as AdakrposAuthConfig, A as AuthContext } from './client-Dd5DjxzG.mjs';
2
+
3
+ declare function verifyRequest(request: Request, config: AdakrposAuthConfig): Promise<AuthContext>;
4
+
5
+ export { verifyRequest };
@@ -0,0 +1,5 @@
1
+ import { a as AdakrposAuthConfig, A as AuthContext } from './client-Dd5DjxzG.js';
2
+
3
+ declare function verifyRequest(request: Request, config: AdakrposAuthConfig): Promise<AuthContext>;
4
+
5
+ export { verifyRequest };