@betterportal/auth-authress-io 0.0.1 → 10.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.
- package/lib/plugins/service-betterportal-auth-authress-io/.bp-generated/registry.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-auth-authress-io/.bp-generated/registry.js +41 -18
- package/lib/plugins/service-betterportal-auth-authress-io/.bp-generated/registry.js.map +1 -1
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/GET.d.ts +3 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/GET.js +3 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/POST.d.ts +3 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/POST.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/POST.js +3 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/POST.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.bootstrap1/{index.d.ts → GET.d.ts} +2 -2
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.bootstrap1/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.bootstrap1/{index.js → GET.js} +1 -1
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.bootstrap1/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.bootstrap1/{_background.monitor.d.ts → _background.monitor.GET.d.ts} +2 -2
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.bootstrap1/_background.monitor.GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.bootstrap1/{_background.monitor.js → _background.monitor.GET.js} +1 -1
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.bootstrap1/_background.monitor.GET.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.bootstrap1/{_nav.profile.d.ts → _nav.profile.GET.d.ts} +2 -2
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.bootstrap1/_nav.profile.GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.bootstrap1/{_nav.profile.js → _nav.profile.GET.js} +1 -1
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.bootstrap1/_nav.profile.GET.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.embedded/{_background.monitor.d.ts → _background.monitor.GET.d.ts} +2 -2
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.embedded/_background.monitor.GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.embedded/{_background.monitor.js → _background.monitor.GET.js} +2 -2
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.embedded/_background.monitor.GET.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/index.d.ts +1 -91
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/index.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/index.js +1 -186
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/index.js.map +1 -1
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/route.impl.d.ts +92 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/route.impl.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/route.impl.js +187 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/route.impl.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/logout/GET.d.ts +3 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/logout/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/logout/GET.js +3 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/logout/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/logout/index.d.ts +1 -26
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/logout/index.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/logout/index.js +1 -34
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/logout/index.js.map +1 -1
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/logout/route.impl.d.ts +27 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/logout/route.impl.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/logout/route.impl.js +35 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/logout/route.impl.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/refresh/POST.d.ts +3 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/refresh/POST.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/refresh/POST.js +3 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/refresh/POST.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/refresh/index.d.ts +1 -28
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/refresh/index.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/refresh/index.js +1 -86
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/refresh/index.js.map +1 -1
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/refresh/route.impl.d.ts +29 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/refresh/route.impl.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/refresh/route.impl.js +87 -0
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/refresh/route.impl.js.map +1 -0
- package/lib/schemas/service-betterportal-auth-authress-io.json +1 -1
- package/lib/schemas/service-betterportal-auth-authress-io.plugin.json +1 -1
- package/package.json +8 -9
- package/bsb-tests.json +0 -14
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.bootstrap1/_background.monitor.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.bootstrap1/_background.monitor.js.map +0 -1
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.bootstrap1/_nav.profile.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.bootstrap1/_nav.profile.js.map +0 -1
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.bootstrap1/index.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.bootstrap1/index.js.map +0 -1
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.embedded/_background.monitor.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/login/_theme.embedded/_background.monitor.js.map +0 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as av from "anyvali";
|
|
2
|
+
import type { Infer } from "anyvali";
|
|
3
|
+
import { type ApiAuthRequirement, type CacheHints, type BetterPortalRouteChrome } from "@betterportal/framework";
|
|
4
|
+
export declare const QuerySchema: av.ObjectSchema<{
|
|
5
|
+
action: av.OptionalSchema<av.StringSchema>;
|
|
6
|
+
next: av.OptionalSchema<av.StringSchema>;
|
|
7
|
+
redirect: av.OptionalSchema<av.StringSchema>;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const HeadersSchema: av.ObjectSchema<{}>;
|
|
10
|
+
export declare const RequestSchema: av.ObjectSchema<{
|
|
11
|
+
accessToken: av.StringSchema;
|
|
12
|
+
next: av.OptionalSchema<av.StringSchema>;
|
|
13
|
+
userId: av.OptionalSchema<av.StringSchema>;
|
|
14
|
+
name: av.OptionalSchema<av.StringSchema>;
|
|
15
|
+
email: av.OptionalSchema<av.StringSchema>;
|
|
16
|
+
picture: av.OptionalSchema<av.StringSchema>;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const ResponseSchema: av.ObjectSchema<{
|
|
19
|
+
status: av.EnumSchema<readonly ["ok", "error"]>;
|
|
20
|
+
message: av.OptionalSchema<av.StringSchema>;
|
|
21
|
+
authressApiUrl: av.OptionalSchema<av.StringSchema>;
|
|
22
|
+
authressApplicationId: av.OptionalSchema<av.StringSchema>;
|
|
23
|
+
scopes: av.ArraySchema<av.StringSchema>;
|
|
24
|
+
alreadyLoggedIn: av.OptionalSchema<av.BoolSchema>;
|
|
25
|
+
loggedOut: av.OptionalSchema<av.BoolSchema>;
|
|
26
|
+
nextUrl: av.OptionalSchema<av.StringSchema>;
|
|
27
|
+
expiresInSeconds: av.OptionalSchema<av.IntSchema>;
|
|
28
|
+
user: av.OptionalSchema<av.ObjectSchema<{
|
|
29
|
+
id: av.OptionalSchema<av.StringSchema>;
|
|
30
|
+
name: av.OptionalSchema<av.StringSchema>;
|
|
31
|
+
email: av.OptionalSchema<av.StringSchema>;
|
|
32
|
+
picture: av.OptionalSchema<av.StringSchema>;
|
|
33
|
+
}>>;
|
|
34
|
+
}>;
|
|
35
|
+
export type ResponseData = Infer<typeof ResponseSchema>;
|
|
36
|
+
export declare const title = "Authress Login";
|
|
37
|
+
export declare const description = "Authenticate with Authress and store the Authress bearer token.";
|
|
38
|
+
export declare const role = "auth.login";
|
|
39
|
+
export declare const dependencies: string[];
|
|
40
|
+
export declare const chrome: BetterPortalRouteChrome;
|
|
41
|
+
export declare const auth: ApiAuthRequirement;
|
|
42
|
+
export declare const cacheHints: CacheHints;
|
|
43
|
+
export declare const handleGet: import("@betterportal/framework").RouteHandler<Record<string, string>, {
|
|
44
|
+
action?: string | undefined;
|
|
45
|
+
next?: string | undefined;
|
|
46
|
+
redirect?: string | undefined;
|
|
47
|
+
}, {}, Record<string, unknown>, {
|
|
48
|
+
status: "ok" | "error";
|
|
49
|
+
scopes: string[];
|
|
50
|
+
message?: string | undefined;
|
|
51
|
+
authressApiUrl?: string | undefined;
|
|
52
|
+
authressApplicationId?: string | undefined;
|
|
53
|
+
alreadyLoggedIn?: boolean | undefined;
|
|
54
|
+
loggedOut?: boolean | undefined;
|
|
55
|
+
nextUrl?: string | undefined;
|
|
56
|
+
expiresInSeconds?: number | undefined;
|
|
57
|
+
user?: {
|
|
58
|
+
id?: string | undefined;
|
|
59
|
+
name?: string | undefined;
|
|
60
|
+
email?: string | undefined;
|
|
61
|
+
picture?: string | undefined;
|
|
62
|
+
} | undefined;
|
|
63
|
+
}, unknown, Record<string, unknown>>;
|
|
64
|
+
export declare const handlePost: import("@betterportal/framework").RouteHandler<Record<string, string>, {
|
|
65
|
+
action?: string | undefined;
|
|
66
|
+
next?: string | undefined;
|
|
67
|
+
redirect?: string | undefined;
|
|
68
|
+
}, Record<string, string>, {
|
|
69
|
+
accessToken: string;
|
|
70
|
+
next?: string | undefined;
|
|
71
|
+
userId?: string | undefined;
|
|
72
|
+
name?: string | undefined;
|
|
73
|
+
email?: string | undefined;
|
|
74
|
+
picture?: string | undefined;
|
|
75
|
+
}, {
|
|
76
|
+
status: "ok" | "error";
|
|
77
|
+
scopes: string[];
|
|
78
|
+
message?: string | undefined;
|
|
79
|
+
authressApiUrl?: string | undefined;
|
|
80
|
+
authressApplicationId?: string | undefined;
|
|
81
|
+
alreadyLoggedIn?: boolean | undefined;
|
|
82
|
+
loggedOut?: boolean | undefined;
|
|
83
|
+
nextUrl?: string | undefined;
|
|
84
|
+
expiresInSeconds?: number | undefined;
|
|
85
|
+
user?: {
|
|
86
|
+
id?: string | undefined;
|
|
87
|
+
name?: string | undefined;
|
|
88
|
+
email?: string | undefined;
|
|
89
|
+
picture?: string | undefined;
|
|
90
|
+
} | undefined;
|
|
91
|
+
}, unknown, Record<string, unknown>>;
|
|
92
|
+
//# sourceMappingURL=route.impl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.impl.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-authress-io/bp-routes/login/route.impl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,KAAK,uBAAuB,EAC7B,MAAM,yBAAyB,CAAC;AAKjC,eAAO,MAAM,WAAW;;;;EAII,CAAC;AAE7B,eAAO,MAAM,aAAa,qBAA0C,CAAC;AAErE,eAAO,MAAM,aAAa;;;;;;;EAOE,CAAC;AAE7B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;EAgBC,CAAC;AAC7B,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAExD,eAAO,MAAM,KAAK,mBAAmB,CAAC;AACtC,eAAO,MAAM,WAAW,oEAAoE,CAAC;AAC7F,eAAO,MAAM,IAAI,eAAe,CAAC;AACjC,eAAO,MAAM,YAAY,UAAoC,CAAC;AAC9D,eAAO,MAAM,MAAM,EAAE,uBAA8C,CAAC;AACpE,eAAO,MAAM,IAAI,EAAE,kBAAyD,CAAC;AAC7E,eAAO,MAAM,UAAU,EAAE,UAA0C,CAAC;AAsCpE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;oCAqDrB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA8DtB,CAAC"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import * as av from "anyvali";
|
|
2
|
+
import { createHandler } from "@betterportal/framework";
|
|
3
|
+
import { resolveAuthressAppConfig, resolveAuthressBrowserConfig } from "../../index.js";
|
|
4
|
+
export const QuerySchema = av.object({
|
|
5
|
+
action: av.optional(av.string()),
|
|
6
|
+
next: av.optional(av.string()),
|
|
7
|
+
redirect: av.optional(av.string())
|
|
8
|
+
}, { unknownKeys: "strip" });
|
|
9
|
+
export const HeadersSchema = av.object({}, { unknownKeys: "strip" });
|
|
10
|
+
export const RequestSchema = av.object({
|
|
11
|
+
accessToken: av.string().minLength(1),
|
|
12
|
+
next: av.optional(av.string()),
|
|
13
|
+
userId: av.optional(av.string()),
|
|
14
|
+
name: av.optional(av.string()),
|
|
15
|
+
email: av.optional(av.string()),
|
|
16
|
+
picture: av.optional(av.string())
|
|
17
|
+
}, { unknownKeys: "strip" });
|
|
18
|
+
export const ResponseSchema = av.object({
|
|
19
|
+
status: av.enum_(["ok", "error"]),
|
|
20
|
+
message: av.optional(av.string()),
|
|
21
|
+
authressApiUrl: av.optional(av.string()),
|
|
22
|
+
authressApplicationId: av.optional(av.string()),
|
|
23
|
+
scopes: av.array(av.string()).default([]),
|
|
24
|
+
alreadyLoggedIn: av.optional(av.bool()),
|
|
25
|
+
loggedOut: av.optional(av.bool()),
|
|
26
|
+
nextUrl: av.optional(av.string()),
|
|
27
|
+
expiresInSeconds: av.optional(av.int().min(1)),
|
|
28
|
+
user: av.optional(av.object({
|
|
29
|
+
id: av.optional(av.string()),
|
|
30
|
+
name: av.optional(av.string()),
|
|
31
|
+
email: av.optional(av.string()),
|
|
32
|
+
picture: av.optional(av.string())
|
|
33
|
+
}, { unknownKeys: "strip" }))
|
|
34
|
+
}, { unknownKeys: "strip" });
|
|
35
|
+
export const title = "Authress Login";
|
|
36
|
+
export const description = "Authenticate with Authress and store the Authress bearer token.";
|
|
37
|
+
export const role = "auth.login";
|
|
38
|
+
export const dependencies = ["logout.index", "refresh.index"];
|
|
39
|
+
export const chrome = { fullScreen: true };
|
|
40
|
+
export const auth = { required: false, permissions: [] };
|
|
41
|
+
export const cacheHints = { ttlSeconds: 0, varyBy: [] };
|
|
42
|
+
function normalizeRedirect(raw) {
|
|
43
|
+
const redirect = raw?.trim();
|
|
44
|
+
if (!redirect)
|
|
45
|
+
return "/";
|
|
46
|
+
if (redirect.startsWith("http://") || redirect.startsWith("https://"))
|
|
47
|
+
return redirect;
|
|
48
|
+
return redirect.startsWith("/") ? redirect : `/${redirect}`;
|
|
49
|
+
}
|
|
50
|
+
function secondsUntilJwtExpiry(token) {
|
|
51
|
+
const [, payload] = token.split(".");
|
|
52
|
+
if (!payload)
|
|
53
|
+
return undefined;
|
|
54
|
+
try {
|
|
55
|
+
const parsed = JSON.parse(Buffer.from(payload, "base64url").toString("utf8"));
|
|
56
|
+
if (typeof parsed.exp !== "number")
|
|
57
|
+
return undefined;
|
|
58
|
+
return Math.max(1, Math.floor(parsed.exp - Date.now() / 1000));
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function splitScopes(value) {
|
|
65
|
+
return (value ?? "openid profile email")
|
|
66
|
+
.split(/\s+/)
|
|
67
|
+
.map((entry) => entry.trim())
|
|
68
|
+
.filter((entry) => entry.length > 0);
|
|
69
|
+
}
|
|
70
|
+
function pluginFrom(ctx) {
|
|
71
|
+
const plugin = ctx.plugin;
|
|
72
|
+
if (!plugin)
|
|
73
|
+
throw new Error("Authress plugin not available on handler context");
|
|
74
|
+
return plugin;
|
|
75
|
+
}
|
|
76
|
+
function profileValue(value) {
|
|
77
|
+
return typeof value === "string" && value.trim().length > 0 ? value.trim() : undefined;
|
|
78
|
+
}
|
|
79
|
+
export const handleGet = createHandler({ response: ResponseSchema, query: QuerySchema, headers: HeadersSchema }, async (ctx) => {
|
|
80
|
+
const appConfig = resolveAuthressAppConfig(ctx.config);
|
|
81
|
+
const nextUrl = normalizeRedirect(ctx.query.next ?? ctx.query.redirect ?? appConfig?.loginRedirectPath);
|
|
82
|
+
const browserConfig = resolveAuthressBrowserConfig(ctx.config);
|
|
83
|
+
if (ctx.query.action === "logout") {
|
|
84
|
+
const loggedOutUrl = normalizeRedirect(appConfig?.logoutRedirectPath);
|
|
85
|
+
ctx.bpHeaders?.remove("Authorization");
|
|
86
|
+
ctx.bpHeaders?.remove("X-BP-Refresh");
|
|
87
|
+
if (ctx.serviceId)
|
|
88
|
+
ctx.responseHeaders?.set("HX-Trigger", `bp:fragments:${ctx.serviceId}`);
|
|
89
|
+
return {
|
|
90
|
+
status: "ok",
|
|
91
|
+
message: "Signed out.",
|
|
92
|
+
authressApiUrl: browserConfig?.authressApiUrl,
|
|
93
|
+
authressApplicationId: browserConfig?.applicationId,
|
|
94
|
+
loggedOut: true,
|
|
95
|
+
scopes: [],
|
|
96
|
+
nextUrl: loggedOutUrl
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
if (ctx.user) {
|
|
100
|
+
return {
|
|
101
|
+
status: "ok",
|
|
102
|
+
message: "Already signed in.",
|
|
103
|
+
authressApiUrl: browserConfig?.authressApiUrl,
|
|
104
|
+
authressApplicationId: browserConfig?.applicationId,
|
|
105
|
+
alreadyLoggedIn: true,
|
|
106
|
+
scopes: [],
|
|
107
|
+
nextUrl,
|
|
108
|
+
user: {
|
|
109
|
+
id: ctx.user.sub,
|
|
110
|
+
name: ctx.user.name,
|
|
111
|
+
email: ctx.user.email,
|
|
112
|
+
picture: ctx.user.picture
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
const config = browserConfig;
|
|
117
|
+
if (!config) {
|
|
118
|
+
return { status: "error", message: "Authress browser config is missing authressApiUrl or applicationId.", scopes: [], nextUrl };
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
status: "ok",
|
|
122
|
+
message: "Start Authress sign in.",
|
|
123
|
+
authressApiUrl: config.authressApiUrl,
|
|
124
|
+
authressApplicationId: config.applicationId,
|
|
125
|
+
scopes: splitScopes(config.scopes),
|
|
126
|
+
nextUrl
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
export const handlePost = createHandler({ response: ResponseSchema, query: QuerySchema, request: RequestSchema }, async (ctx) => {
|
|
130
|
+
const request = ctx.request;
|
|
131
|
+
const config = resolveAuthressAppConfig(ctx.config);
|
|
132
|
+
const nextUrl = normalizeRedirect(request.next ?? ctx.query.next ?? config?.loginRedirectPath);
|
|
133
|
+
if (!config) {
|
|
134
|
+
return { status: "error", message: "Authress config is missing authressApiUrl or applicationId.", scopes: [], nextUrl };
|
|
135
|
+
}
|
|
136
|
+
let user;
|
|
137
|
+
try {
|
|
138
|
+
user = await pluginFrom(ctx).verifyAuthressToken(request.accessToken, config, { tenantId: ctx.tenant.id, appId: ctx.app.id });
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
ctx.obs?.error(error);
|
|
142
|
+
return { status: "error", message: `Authress token verification failed: ${error.message}`, scopes: [], nextUrl };
|
|
143
|
+
}
|
|
144
|
+
if (request.userId && request.userId !== user.sub) {
|
|
145
|
+
return { status: "error", message: "Authress profile subject does not match token subject.", scopes: [], nextUrl };
|
|
146
|
+
}
|
|
147
|
+
const issued = pluginFrom(ctx).issueTokenPair({
|
|
148
|
+
sub: user.sub,
|
|
149
|
+
tenantId: ctx.tenant.id,
|
|
150
|
+
appId: ctx.app.id,
|
|
151
|
+
roles: user.roles,
|
|
152
|
+
authProvider: "authress.io",
|
|
153
|
+
providerSubject: user.sub,
|
|
154
|
+
provider: user.provider,
|
|
155
|
+
name: profileValue(request.name) || user.name,
|
|
156
|
+
email: profileValue(request.email) || user.email,
|
|
157
|
+
picture: profileValue(request.picture) || user.picture
|
|
158
|
+
}, { includeRefreshToken: false });
|
|
159
|
+
ctx.bpHeaders?.set("Authorization", `Bearer ${issued.accessToken}`, {
|
|
160
|
+
locked: true,
|
|
161
|
+
expiresInSeconds: issued.accessTokenExpiresInSeconds,
|
|
162
|
+
refreshPath: "/refresh",
|
|
163
|
+
refreshBeforeSeconds: 60
|
|
164
|
+
});
|
|
165
|
+
ctx.bpHeaders?.set("X-BP-Refresh", request.accessToken, {
|
|
166
|
+
locked: true,
|
|
167
|
+
scopeToOwner: true,
|
|
168
|
+
expiresInSeconds: secondsUntilJwtExpiry(request.accessToken)
|
|
169
|
+
});
|
|
170
|
+
ctx.responseHeaders?.set("HX-Redirect", nextUrl);
|
|
171
|
+
if (ctx.serviceId)
|
|
172
|
+
ctx.responseHeaders?.set("HX-Trigger", `bp:fragments:${ctx.serviceId}`);
|
|
173
|
+
return {
|
|
174
|
+
status: "ok",
|
|
175
|
+
message: "Signed in.",
|
|
176
|
+
scopes: [],
|
|
177
|
+
nextUrl,
|
|
178
|
+
expiresInSeconds: issued.accessTokenExpiresInSeconds,
|
|
179
|
+
user: {
|
|
180
|
+
id: user.sub,
|
|
181
|
+
name: profileValue(request.name) ?? user.name,
|
|
182
|
+
email: profileValue(request.email) ?? user.email,
|
|
183
|
+
picture: profileValue(request.picture) ?? user.picture
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
});
|
|
187
|
+
//# sourceMappingURL=route.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.impl.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-authress-io/bp-routes/login/route.impl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAE9B,OAAO,EACL,aAAa,EAId,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAExF,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC,MAAM,CAAC;IACnC,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC;IAChC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC;IAC9B,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC;CACnC,EAAE,EAAE,WAAW,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AE,GAAG,CAAC,YAAY,EAAE,gBAAgB,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC;IAE3F,OAAO;QACL,MAAM,EAAE,IAAa;QACrB,OAAO,EAAE,YAAY;QACrB,MAAM,EAAE,EAAE;QACV,OAAO;QACP,gBAAgB,EAAE,MAAM,CAAC,2BAA2B;QACpD,IAAI,EAAE;YACJ,EAAE,EAAE,IAAI,CAAC,GAAG;YACZ,IAAI,EAAE,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI;YAC7C,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK;YAChD,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,OAAO;SACvD;KACF,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GET.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-authress-io/bp-routes/logout/GET.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GET.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-authress-io/bp-routes/logout/GET.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,27 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import type { Infer } from "anyvali";
|
|
3
|
-
import { type ApiAuthRequirement, type CacheHints } from "@betterportal/framework";
|
|
4
|
-
export declare const QuerySchema: av.ObjectSchema<{
|
|
5
|
-
next: av.OptionalSchema<av.StringSchema>;
|
|
6
|
-
redirect: av.OptionalSchema<av.StringSchema>;
|
|
7
|
-
}>;
|
|
8
|
-
export declare const ResponseSchema: av.ObjectSchema<{
|
|
9
|
-
status: av.EnumSchema<readonly ["ok"]>;
|
|
10
|
-
message: av.StringSchema;
|
|
11
|
-
nextUrl: av.StringSchema;
|
|
12
|
-
}>;
|
|
13
|
-
export type ResponseData = Infer<typeof ResponseSchema>;
|
|
14
|
-
export declare const title = "Authress Logout";
|
|
15
|
-
export declare const description = "Clear the stored Authress bearer token.";
|
|
16
|
-
export declare const role = "auth.logout";
|
|
17
|
-
export declare const auth: ApiAuthRequirement;
|
|
18
|
-
export declare const cacheHints: CacheHints;
|
|
19
|
-
export declare const handleGet: import("@betterportal/framework").RouteHandler<Record<string, string>, {
|
|
20
|
-
next?: string | undefined;
|
|
21
|
-
redirect?: string | undefined;
|
|
22
|
-
}, Record<string, string>, Record<string, unknown>, {
|
|
23
|
-
status: "ok";
|
|
24
|
-
message: string;
|
|
25
|
-
nextUrl: string;
|
|
26
|
-
}, unknown, Record<string, unknown>>;
|
|
1
|
+
export { title, description, auth, role, cacheHints } from "./route.impl.js";
|
|
27
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-authress-io/bp-routes/logout/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-authress-io/bp-routes/logout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,35 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { createHandler } from "@betterportal/framework";
|
|
3
|
-
export const QuerySchema = av.object({
|
|
4
|
-
next: av.optional(av.string()),
|
|
5
|
-
redirect: av.optional(av.string())
|
|
6
|
-
}, { unknownKeys: "strip" });
|
|
7
|
-
export const ResponseSchema = av.object({
|
|
8
|
-
status: av.enum_(["ok"]),
|
|
9
|
-
message: av.string(),
|
|
10
|
-
nextUrl: av.string()
|
|
11
|
-
}, { unknownKeys: "strip" });
|
|
12
|
-
export const title = "Authress Logout";
|
|
13
|
-
export const description = "Clear the stored Authress bearer token.";
|
|
14
|
-
export const role = "auth.logout";
|
|
15
|
-
export const auth = { required: false, permissions: [] };
|
|
16
|
-
export const cacheHints = { ttlSeconds: 0, varyBy: [] };
|
|
17
|
-
function normalizeRedirect(raw) {
|
|
18
|
-
const redirect = raw?.trim();
|
|
19
|
-
if (!redirect)
|
|
20
|
-
return "/";
|
|
21
|
-
if (redirect.startsWith("http://") || redirect.startsWith("https://"))
|
|
22
|
-
return redirect;
|
|
23
|
-
return redirect.startsWith("/") ? redirect : `/${redirect}`;
|
|
24
|
-
}
|
|
25
|
-
export const handleGet = createHandler({ response: ResponseSchema, query: QuerySchema }, (ctx) => {
|
|
26
|
-
const query = ctx.query;
|
|
27
|
-
const nextUrl = normalizeRedirect(query.next ?? query.redirect);
|
|
28
|
-
ctx.bpHeaders?.remove("Authorization");
|
|
29
|
-
ctx.bpHeaders?.remove("X-BP-Refresh");
|
|
30
|
-
ctx.responseHeaders?.set("HX-Location", "/login?action=logout");
|
|
31
|
-
if (ctx.serviceId)
|
|
32
|
-
ctx.responseHeaders?.set("HX-Trigger", `bp:fragments:${ctx.serviceId}`);
|
|
33
|
-
return { status: "ok", message: "Signed out.", nextUrl };
|
|
34
|
-
});
|
|
1
|
+
export { title, description, auth, role, cacheHints } from "./route.impl.js";
|
|
35
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-authress-io/bp-routes/logout/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-authress-io/bp-routes/logout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as av from "anyvali";
|
|
2
|
+
import type { Infer } from "anyvali";
|
|
3
|
+
import { type ApiAuthRequirement, type CacheHints } from "@betterportal/framework";
|
|
4
|
+
export declare const QuerySchema: av.ObjectSchema<{
|
|
5
|
+
next: av.OptionalSchema<av.StringSchema>;
|
|
6
|
+
redirect: av.OptionalSchema<av.StringSchema>;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const ResponseSchema: av.ObjectSchema<{
|
|
9
|
+
status: av.EnumSchema<readonly ["ok"]>;
|
|
10
|
+
message: av.StringSchema;
|
|
11
|
+
nextUrl: av.StringSchema;
|
|
12
|
+
}>;
|
|
13
|
+
export type ResponseData = Infer<typeof ResponseSchema>;
|
|
14
|
+
export declare const title = "Authress Logout";
|
|
15
|
+
export declare const description = "Clear the stored Authress bearer token.";
|
|
16
|
+
export declare const role = "auth.logout";
|
|
17
|
+
export declare const auth: ApiAuthRequirement;
|
|
18
|
+
export declare const cacheHints: CacheHints;
|
|
19
|
+
export declare const handleGet: import("@betterportal/framework").RouteHandler<Record<string, string>, {
|
|
20
|
+
next?: string | undefined;
|
|
21
|
+
redirect?: string | undefined;
|
|
22
|
+
}, Record<string, string>, Record<string, unknown>, {
|
|
23
|
+
status: "ok";
|
|
24
|
+
message: string;
|
|
25
|
+
nextUrl: string;
|
|
26
|
+
}, unknown, Record<string, unknown>>;
|
|
27
|
+
//# sourceMappingURL=route.impl.d.ts.map
|
package/lib/plugins/service-betterportal-auth-authress-io/bp-routes/logout/route.impl.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.impl.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-authress-io/bp-routes/logout/route.impl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAiB,KAAK,kBAAkB,EAAE,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAElG,eAAO,MAAM,WAAW;;;EAGI,CAAC;AAE7B,eAAO,MAAM,cAAc;;;;EAIC,CAAC;AAC7B,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAExD,eAAO,MAAM,KAAK,oBAAoB,CAAC;AACvC,eAAO,MAAM,WAAW,4CAA4C,CAAC;AACrE,eAAO,MAAM,IAAI,gBAAgB,CAAC;AAClC,eAAO,MAAM,IAAI,EAAE,kBAAyD,CAAC;AAC7E,eAAO,MAAM,UAAU,EAAE,UAA0C,CAAC;AASpE,eAAO,MAAM,SAAS;;;;;;;oCAWrB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as av from "anyvali";
|
|
2
|
+
import { createHandler } from "@betterportal/framework";
|
|
3
|
+
export const QuerySchema = av.object({
|
|
4
|
+
next: av.optional(av.string()),
|
|
5
|
+
redirect: av.optional(av.string())
|
|
6
|
+
}, { unknownKeys: "strip" });
|
|
7
|
+
export const ResponseSchema = av.object({
|
|
8
|
+
status: av.enum_(["ok"]),
|
|
9
|
+
message: av.string(),
|
|
10
|
+
nextUrl: av.string()
|
|
11
|
+
}, { unknownKeys: "strip" });
|
|
12
|
+
export const title = "Authress Logout";
|
|
13
|
+
export const description = "Clear the stored Authress bearer token.";
|
|
14
|
+
export const role = "auth.logout";
|
|
15
|
+
export const auth = { required: false, permissions: [] };
|
|
16
|
+
export const cacheHints = { ttlSeconds: 0, varyBy: [] };
|
|
17
|
+
function normalizeRedirect(raw) {
|
|
18
|
+
const redirect = raw?.trim();
|
|
19
|
+
if (!redirect)
|
|
20
|
+
return "/";
|
|
21
|
+
if (redirect.startsWith("http://") || redirect.startsWith("https://"))
|
|
22
|
+
return redirect;
|
|
23
|
+
return redirect.startsWith("/") ? redirect : `/${redirect}`;
|
|
24
|
+
}
|
|
25
|
+
export const handleGet = createHandler({ response: ResponseSchema, query: QuerySchema }, (ctx) => {
|
|
26
|
+
const query = ctx.query;
|
|
27
|
+
const nextUrl = normalizeRedirect(query.next ?? query.redirect);
|
|
28
|
+
ctx.bpHeaders?.remove("Authorization");
|
|
29
|
+
ctx.bpHeaders?.remove("X-BP-Refresh");
|
|
30
|
+
ctx.responseHeaders?.set("HX-Location", "/login?action=logout");
|
|
31
|
+
if (ctx.serviceId)
|
|
32
|
+
ctx.responseHeaders?.set("HX-Trigger", `bp:fragments:${ctx.serviceId}`);
|
|
33
|
+
return { status: "ok", message: "Signed out.", nextUrl };
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=route.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.impl.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-authress-io/bp-routes/logout/route.impl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAE,aAAa,EAA4C,MAAM,yBAAyB,CAAC;AAElG,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC,MAAM,CAAC;IACnC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC;IAC9B,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC;CACnC,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC;AAE7B,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC,MAAM,CAAC;IACtC,MAAM,EAAE,EAAE,CAAC,KAAK,CAA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AAC;IACvC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC;IACtC,GAAG,CAAC,eAAe,EAAE,GAAG,CAAC,aAAa,EAAE,sBAAsB,CAAC,CAAC;IAChE,IAAI,GAAG,CAAC,SAAS;QAAE,GAAG,CAAC,eAAe,EAAE,GAAG,CAAC,YAAY,EAAE,gBAAgB,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC;IAC3F,OAAO,EAAE,MAAM,EAAE,IAAa,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC;AACpE,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"POST.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-authress-io/bp-routes/refresh/POST.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,UAAU,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"POST.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-authress-io/bp-routes/refresh/POST.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,UAAU,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,29 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import type { Infer } from "anyvali";
|
|
3
|
-
import { type ApiAuthRequirement, type CacheHints } from "@betterportal/framework";
|
|
4
|
-
export declare const RequestSchema: av.ObjectSchema<{
|
|
5
|
-
refreshToken: av.OptionalSchema<av.StringSchema>;
|
|
6
|
-
accessToken: av.OptionalSchema<av.StringSchema>;
|
|
7
|
-
}>;
|
|
8
|
-
export declare const ResponseSchema: av.ObjectSchema<{
|
|
9
|
-
status: av.EnumSchema<readonly ["ok", "error"]>;
|
|
10
|
-
message: av.OptionalSchema<av.StringSchema>;
|
|
11
|
-
accessToken: av.OptionalSchema<av.StringSchema>;
|
|
12
|
-
expiresInSeconds: av.OptionalSchema<av.IntSchema>;
|
|
13
|
-
}>;
|
|
14
|
-
export type ResponseData = Infer<typeof ResponseSchema>;
|
|
15
|
-
export declare const title = "Authress Refresh";
|
|
16
|
-
export declare const description = "Refresh BetterPortal tokens after Authress session renewal.";
|
|
17
|
-
export declare const role = "auth.refresh";
|
|
18
|
-
export declare const auth: ApiAuthRequirement;
|
|
19
|
-
export declare const cacheHints: CacheHints;
|
|
20
|
-
export declare const handlePost: import("@betterportal/framework").RouteHandler<Record<string, string>, Record<string, unknown>, Record<string, string>, {
|
|
21
|
-
refreshToken?: string | undefined;
|
|
22
|
-
accessToken?: string | undefined;
|
|
23
|
-
}, {
|
|
24
|
-
status: "ok" | "error";
|
|
25
|
-
message?: string | undefined;
|
|
26
|
-
accessToken?: string | undefined;
|
|
27
|
-
expiresInSeconds?: number | undefined;
|
|
28
|
-
}, unknown, Record<string, unknown>>;
|
|
1
|
+
export { title, description, auth, role, cacheHints } from "./route.impl.js";
|
|
29
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-authress-io/bp-routes/refresh/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-authress-io/bp-routes/refresh/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,87 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { createHandler } from "@betterportal/framework";
|
|
3
|
-
import { resolveAuthressAppConfig } from "../../index.js";
|
|
4
|
-
export const RequestSchema = av.object({
|
|
5
|
-
refreshToken: av.optional(av.string().minLength(1)),
|
|
6
|
-
accessToken: av.optional(av.string())
|
|
7
|
-
}, { unknownKeys: "strip" });
|
|
8
|
-
export const ResponseSchema = av.object({
|
|
9
|
-
status: av.enum_(["ok", "error"]),
|
|
10
|
-
message: av.optional(av.string()),
|
|
11
|
-
accessToken: av.optional(av.string()),
|
|
12
|
-
expiresInSeconds: av.optional(av.int().min(1))
|
|
13
|
-
}, { unknownKeys: "strip" });
|
|
14
|
-
export const title = "Authress Refresh";
|
|
15
|
-
export const description = "Refresh BetterPortal tokens after Authress session renewal.";
|
|
16
|
-
export const role = "auth.refresh";
|
|
17
|
-
export const auth = { required: false, permissions: [] };
|
|
18
|
-
export const cacheHints = { ttlSeconds: 0, varyBy: [] };
|
|
19
|
-
function pluginFrom(ctx) {
|
|
20
|
-
const plugin = ctx.plugin;
|
|
21
|
-
if (!plugin)
|
|
22
|
-
throw new Error("Authress plugin not available on handler context");
|
|
23
|
-
return plugin;
|
|
24
|
-
}
|
|
25
|
-
export const handlePost = createHandler({ response: ResponseSchema, request: RequestSchema }, async (ctx) => {
|
|
26
|
-
const config = resolveAuthressAppConfig(ctx.config);
|
|
27
|
-
if (!config) {
|
|
28
|
-
return { status: "error", message: "Authress config is missing authressApiUrl or applicationId." };
|
|
29
|
-
}
|
|
30
|
-
const body = ctx.request;
|
|
31
|
-
const headers = ctx.headers;
|
|
32
|
-
const authressToken = body.accessToken ?? headers["x-bp-refresh"];
|
|
33
|
-
if (!authressToken?.trim()) {
|
|
34
|
-
return { status: "error", message: "Authress access token is required to refresh BetterPortal tokens." };
|
|
35
|
-
}
|
|
36
|
-
const plugin = pluginFrom(ctx);
|
|
37
|
-
let authressClaims;
|
|
38
|
-
try {
|
|
39
|
-
authressClaims = await plugin.verifyAuthressToken(authressToken, config, { tenantId: ctx.tenant.id, appId: ctx.app.id });
|
|
40
|
-
}
|
|
41
|
-
catch {
|
|
42
|
-
return { status: "error", message: "Authress token invalid or expired." };
|
|
43
|
-
}
|
|
44
|
-
const issued = plugin.issueTokenPair({
|
|
45
|
-
sub: authressClaims.sub,
|
|
46
|
-
tenantId: ctx.tenant.id,
|
|
47
|
-
appId: ctx.app.id,
|
|
48
|
-
roles: authressClaims.roles,
|
|
49
|
-
authProvider: "authress.io",
|
|
50
|
-
providerSubject: authressClaims.sub,
|
|
51
|
-
provider: authressClaims.provider,
|
|
52
|
-
name: authressClaims.name,
|
|
53
|
-
email: authressClaims.email,
|
|
54
|
-
picture: authressClaims.picture
|
|
55
|
-
}, { includeRefreshToken: false });
|
|
56
|
-
ctx.bpHeaders?.set("Authorization", `Bearer ${issued.accessToken}`, {
|
|
57
|
-
locked: true,
|
|
58
|
-
expiresInSeconds: issued.accessTokenExpiresInSeconds,
|
|
59
|
-
refreshPath: "/refresh",
|
|
60
|
-
refreshBeforeSeconds: 60
|
|
61
|
-
});
|
|
62
|
-
ctx.bpHeaders?.set("X-BP-Refresh", authressToken, {
|
|
63
|
-
locked: true,
|
|
64
|
-
scopeToOwner: true,
|
|
65
|
-
expiresInSeconds: secondsUntilJwtExpiry(authressToken)
|
|
66
|
-
});
|
|
67
|
-
return {
|
|
68
|
-
status: "ok",
|
|
69
|
-
accessToken: issued.accessToken,
|
|
70
|
-
expiresInSeconds: issued.accessTokenExpiresInSeconds
|
|
71
|
-
};
|
|
72
|
-
});
|
|
73
|
-
function secondsUntilJwtExpiry(token) {
|
|
74
|
-
const payload = token.split(".")[1];
|
|
75
|
-
if (!payload)
|
|
76
|
-
return 60 * 15;
|
|
77
|
-
try {
|
|
78
|
-
const parsed = JSON.parse(Buffer.from(payload, "base64url").toString("utf8"));
|
|
79
|
-
if (typeof parsed.exp !== "number")
|
|
80
|
-
return 60 * 15;
|
|
81
|
-
return Math.max(1, parsed.exp - Math.floor(Date.now() / 1000));
|
|
82
|
-
}
|
|
83
|
-
catch {
|
|
84
|
-
return 60 * 15;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
1
|
+
export { title, description, auth, role, cacheHints } from "./route.impl.js";
|
|
87
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-authress-io/bp-routes/refresh/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-authress-io/bp-routes/refresh/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|