@betterportal/auth-default 10.0.0 → 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-default/.bp-generated/registry.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-auth-default/.bp-generated/registry.js +77 -31
- package/lib/plugins/service-betterportal-auth-default/.bp-generated/registry.js.map +1 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/GET.d.ts +3 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/GET.js +3 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/POST.d.ts +3 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/POST.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/POST.js +3 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/POST.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/{index.d.ts → GET.d.ts} +2 -2
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/{index.js → GET.js} +1 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/{_nav.profile.d.ts → _nav.profile.GET.d.ts} +2 -2
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/_nav.profile.GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/{_nav.profile.js → _nav.profile.GET.js} +1 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/_nav.profile.GET.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/index.d.ts +1 -88
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/index.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/index.js +1 -185
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/index.js.map +1 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/route.impl.d.ts +89 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/route.impl.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/route.impl.js +186 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/route.impl.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/GET.d.ts +3 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/GET.js +3 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/POST.d.ts +3 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/POST.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/POST.js +3 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/POST.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/_theme.bootstrap1/{index.d.ts → GET.d.ts} +2 -2
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/_theme.bootstrap1/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/_theme.bootstrap1/{index.js → GET.js} +1 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/_theme.bootstrap1/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/index.d.ts +1 -24
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/index.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/index.js +1 -37
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/index.js.map +1 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/route.impl.d.ts +25 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/route.impl.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/route.impl.js +38 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/route.impl.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/POST.d.ts +3 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/POST.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/POST.js +3 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/POST.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/index.d.ts +1 -30
- package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/index.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/index.js +1 -91
- package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/index.js.map +1 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/route.impl.d.ts +31 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/route.impl.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/route.impl.js +92 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/route.impl.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/GET.d.ts +3 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/GET.js +3 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/POST.d.ts +3 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/POST.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/POST.js +3 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/POST.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/{index.400.js → 400.d.ts} +2 -2
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/400.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/{index.400.d.ts → 400.js} +2 -2
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/400.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/{index.d.ts → GET.d.ts} +2 -2
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/{index.js → GET.js} +1 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/index.d.ts +1 -63
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/index.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/index.js +1 -105
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/index.js.map +1 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/route.impl.d.ts +64 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/route.impl.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/route.impl.js +106 -0
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/route.impl.js.map +1 -0
- package/lib/schemas/service-betterportal-auth-default.json +1 -1
- package/lib/schemas/service-betterportal-auth-default.plugin.json +1 -1
- package/package.json +3 -3
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/_nav.profile.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/_nav.profile.js.map +0 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/index.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/index.js.map +0 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/_theme.bootstrap1/index.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/_theme.bootstrap1/index.js.map +0 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/index.400.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/index.400.js.map +0 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/index.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/plugins/service-betterportal-auth-default/.bp-generated/registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/plugins/service-betterportal-auth-default/.bp-generated/registry.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEpE,eAAO,MAAM,QAAQ,EAAE,oBAqJtB,CAAC"}
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
// AUTO-GENERATED by BetterPortal codegen - DO NOT EDIT
|
|
2
2
|
import * as loginRoute from "../bp-routes/login/index.js";
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
3
|
+
import * as loginGETRoute from "../bp-routes/login/GET.js";
|
|
4
|
+
import * as loginPOSTRoute from "../bp-routes/login/POST.js";
|
|
5
|
+
import * as loginBootstrap1PageGET from "../bp-routes/login/_theme.bootstrap1/GET.js";
|
|
6
|
+
import * as loginBootstrap1NavProfileGET from "../bp-routes/login/_theme.bootstrap1/_nav.profile.GET.js";
|
|
5
7
|
import * as logoutRoute from "../bp-routes/logout/index.js";
|
|
6
|
-
import * as
|
|
8
|
+
import * as logoutGETRoute from "../bp-routes/logout/GET.js";
|
|
9
|
+
import * as logoutPOSTRoute from "../bp-routes/logout/POST.js";
|
|
10
|
+
import * as logoutBootstrap1PageGET from "../bp-routes/logout/_theme.bootstrap1/GET.js";
|
|
7
11
|
import * as refreshRoute from "../bp-routes/refresh/index.js";
|
|
12
|
+
import * as refreshPOSTRoute from "../bp-routes/refresh/POST.js";
|
|
8
13
|
import * as registerRoute from "../bp-routes/register/index.js";
|
|
9
|
-
import * as
|
|
10
|
-
import * as
|
|
14
|
+
import * as registerGETRoute from "../bp-routes/register/GET.js";
|
|
15
|
+
import * as registerPOSTRoute from "../bp-routes/register/POST.js";
|
|
16
|
+
import * as registerBootstrap1PageS400 from "../bp-routes/register/_theme.bootstrap1/400.js";
|
|
17
|
+
import * as registerBootstrap1PageGET from "../bp-routes/register/_theme.bootstrap1/GET.js";
|
|
11
18
|
export const registry = {
|
|
12
19
|
routes: [
|
|
13
20
|
{
|
|
@@ -16,12 +23,23 @@ export const registry = {
|
|
|
16
23
|
methods: ["GET", "POST"],
|
|
17
24
|
paramNames: [],
|
|
18
25
|
schemas: {
|
|
19
|
-
response:
|
|
20
|
-
query:
|
|
21
|
-
headers:
|
|
22
|
-
request:
|
|
26
|
+
response: loginGETRoute.ResponseSchema,
|
|
27
|
+
query: loginGETRoute.QuerySchema,
|
|
28
|
+
headers: loginGETRoute.HeadersSchema,
|
|
29
|
+
request: loginGETRoute.RequestSchema
|
|
23
30
|
},
|
|
24
|
-
|
|
31
|
+
methodRoutes: { GET: { method: "GET", schemas: {
|
|
32
|
+
response: loginGETRoute.ResponseSchema,
|
|
33
|
+
query: loginGETRoute.QuerySchema,
|
|
34
|
+
headers: loginGETRoute.HeadersSchema,
|
|
35
|
+
request: loginGETRoute.RequestSchema
|
|
36
|
+
}, handler: loginGETRoute.default }, POST: { method: "POST", schemas: {
|
|
37
|
+
response: loginPOSTRoute.ResponseSchema,
|
|
38
|
+
query: loginPOSTRoute.QuerySchema,
|
|
39
|
+
headers: loginPOSTRoute.HeadersSchema,
|
|
40
|
+
request: loginPOSTRoute.RequestSchema
|
|
41
|
+
}, handler: loginPOSTRoute.default } },
|
|
42
|
+
handlers: { GET: loginGETRoute.default, POST: loginPOSTRoute.default },
|
|
25
43
|
title: loginRoute.title,
|
|
26
44
|
description: loginRoute.description,
|
|
27
45
|
auth: loginRoute.auth,
|
|
@@ -32,24 +50,35 @@ export const registry = {
|
|
|
32
50
|
demoScenarios: [],
|
|
33
51
|
themeRenderers: {
|
|
34
52
|
"bootstrap1": {
|
|
35
|
-
pages: [{ rendererId: "default", type: "page", render:
|
|
53
|
+
pages: [{ rendererId: "default", type: "page", method: "GET", render: loginBootstrap1PageGET.render }],
|
|
36
54
|
components: [],
|
|
37
|
-
fragments: [{ rendererId: "nav.profile", type: "fragment", fragmentLocation: "nav", fragmentId: "profile", render:
|
|
55
|
+
fragments: [{ rendererId: "nav.profile", type: "fragment", method: "GET", fragmentLocation: "nav", fragmentId: "profile", render: loginBootstrap1NavProfileGET.render }]
|
|
38
56
|
}
|
|
39
57
|
}
|
|
40
58
|
},
|
|
41
59
|
{
|
|
42
60
|
viewId: "logout.index",
|
|
43
61
|
path: "/logout",
|
|
44
|
-
methods: ["
|
|
62
|
+
methods: ["GET", "POST"],
|
|
45
63
|
paramNames: [],
|
|
46
64
|
schemas: {
|
|
47
|
-
response:
|
|
48
|
-
query:
|
|
49
|
-
headers:
|
|
50
|
-
request:
|
|
65
|
+
response: logoutGETRoute.ResponseSchema,
|
|
66
|
+
query: logoutGETRoute.QuerySchema,
|
|
67
|
+
headers: logoutGETRoute.HeadersSchema,
|
|
68
|
+
request: logoutGETRoute.RequestSchema
|
|
51
69
|
},
|
|
52
|
-
|
|
70
|
+
methodRoutes: { GET: { method: "GET", schemas: {
|
|
71
|
+
response: logoutGETRoute.ResponseSchema,
|
|
72
|
+
query: logoutGETRoute.QuerySchema,
|
|
73
|
+
headers: logoutGETRoute.HeadersSchema,
|
|
74
|
+
request: logoutGETRoute.RequestSchema
|
|
75
|
+
}, handler: logoutGETRoute.default }, POST: { method: "POST", schemas: {
|
|
76
|
+
response: logoutPOSTRoute.ResponseSchema,
|
|
77
|
+
query: logoutPOSTRoute.QuerySchema,
|
|
78
|
+
headers: logoutPOSTRoute.HeadersSchema,
|
|
79
|
+
request: logoutPOSTRoute.RequestSchema
|
|
80
|
+
}, handler: logoutPOSTRoute.default } },
|
|
81
|
+
handlers: { GET: logoutGETRoute.default, POST: logoutPOSTRoute.default },
|
|
53
82
|
title: logoutRoute.title,
|
|
54
83
|
description: logoutRoute.description,
|
|
55
84
|
auth: logoutRoute.auth,
|
|
@@ -58,7 +87,7 @@ export const registry = {
|
|
|
58
87
|
demoScenarios: [],
|
|
59
88
|
themeRenderers: {
|
|
60
89
|
"bootstrap1": {
|
|
61
|
-
pages: [{ rendererId: "default", type: "page", render:
|
|
90
|
+
pages: [{ rendererId: "default", type: "page", method: "GET", render: logoutBootstrap1PageGET.render }],
|
|
62
91
|
components: [],
|
|
63
92
|
fragments: []
|
|
64
93
|
}
|
|
@@ -70,12 +99,18 @@ export const registry = {
|
|
|
70
99
|
methods: ["POST"],
|
|
71
100
|
paramNames: [],
|
|
72
101
|
schemas: {
|
|
73
|
-
response:
|
|
74
|
-
query:
|
|
75
|
-
headers:
|
|
76
|
-
request:
|
|
102
|
+
response: refreshPOSTRoute.ResponseSchema,
|
|
103
|
+
query: refreshPOSTRoute.QuerySchema,
|
|
104
|
+
headers: refreshPOSTRoute.HeadersSchema,
|
|
105
|
+
request: refreshPOSTRoute.RequestSchema
|
|
77
106
|
},
|
|
78
|
-
|
|
107
|
+
methodRoutes: { POST: { method: "POST", schemas: {
|
|
108
|
+
response: refreshPOSTRoute.ResponseSchema,
|
|
109
|
+
query: refreshPOSTRoute.QuerySchema,
|
|
110
|
+
headers: refreshPOSTRoute.HeadersSchema,
|
|
111
|
+
request: refreshPOSTRoute.RequestSchema
|
|
112
|
+
}, handler: refreshPOSTRoute.default } },
|
|
113
|
+
handlers: { POST: refreshPOSTRoute.default },
|
|
79
114
|
title: refreshRoute.title,
|
|
80
115
|
description: refreshRoute.description,
|
|
81
116
|
auth: refreshRoute.auth,
|
|
@@ -90,12 +125,23 @@ export const registry = {
|
|
|
90
125
|
methods: ["GET", "POST"],
|
|
91
126
|
paramNames: [],
|
|
92
127
|
schemas: {
|
|
93
|
-
response:
|
|
94
|
-
query:
|
|
95
|
-
headers:
|
|
96
|
-
request:
|
|
128
|
+
response: registerGETRoute.ResponseSchema,
|
|
129
|
+
query: registerGETRoute.QuerySchema,
|
|
130
|
+
headers: registerGETRoute.HeadersSchema,
|
|
131
|
+
request: registerGETRoute.RequestSchema
|
|
97
132
|
},
|
|
98
|
-
|
|
133
|
+
methodRoutes: { GET: { method: "GET", schemas: {
|
|
134
|
+
response: registerGETRoute.ResponseSchema,
|
|
135
|
+
query: registerGETRoute.QuerySchema,
|
|
136
|
+
headers: registerGETRoute.HeadersSchema,
|
|
137
|
+
request: registerGETRoute.RequestSchema
|
|
138
|
+
}, handler: registerGETRoute.default }, POST: { method: "POST", schemas: {
|
|
139
|
+
response: registerPOSTRoute.ResponseSchema,
|
|
140
|
+
query: registerPOSTRoute.QuerySchema,
|
|
141
|
+
headers: registerPOSTRoute.HeadersSchema,
|
|
142
|
+
request: registerPOSTRoute.RequestSchema
|
|
143
|
+
}, handler: registerPOSTRoute.default } },
|
|
144
|
+
handlers: { GET: registerGETRoute.default, POST: registerPOSTRoute.default },
|
|
99
145
|
title: registerRoute.title,
|
|
100
146
|
description: registerRoute.description,
|
|
101
147
|
auth: registerRoute.auth,
|
|
@@ -106,14 +152,14 @@ export const registry = {
|
|
|
106
152
|
demoScenarios: [],
|
|
107
153
|
themeRenderers: {
|
|
108
154
|
"bootstrap1": {
|
|
109
|
-
pages: [{ rendererId: "default", type: "page", render:
|
|
155
|
+
pages: [{ rendererId: "default", type: "page", method: "GET", render: registerBootstrap1PageGET.render }],
|
|
110
156
|
components: [],
|
|
111
157
|
fragments: []
|
|
112
158
|
}
|
|
113
159
|
},
|
|
114
160
|
statusRenderers: {
|
|
115
161
|
"bootstrap1": {
|
|
116
|
-
400: {
|
|
162
|
+
400: { pages: [{ rendererId: "default", type: "page", render: registerBootstrap1PageS400.render }] }
|
|
117
163
|
}
|
|
118
164
|
}
|
|
119
165
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/plugins/service-betterportal-auth-default/.bp-generated/registry.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/plugins/service-betterportal-auth-default/.bp-generated/registry.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,aAAa,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,cAAc,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,sBAAsB,MAAM,6CAA6C,CAAC;AACtF,OAAO,KAAK,4BAA4B,MAAM,0DAA0D,CAAC;AACzG,OAAO,KAAK,WAAW,MAAM,8BAA8B,CAAC;AAC5D,OAAO,KAAK,cAAc,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,eAAe,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,uBAAuB,MAAM,8CAA8C,CAAC;AACxF,OAAO,KAAK,YAAY,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,gBAAgB,MAAM,8B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KAAK,EAAE,iBAAiB,CAAC,WAAW;wBACpC,OAAO,EAAE,iBAAiB,CAAC,aAAa;wBACxC,OAAO,EAAE,iBAAiB,CAAC,aAAa;qBACzC,EAAE,OAAO,EAAE,iBAAiB,CAAC,OAAO,EAAE,EAAE;YACzC,QAAQ,EAAE,EAAE,GAAG,EAAE,gBAAgB,CAAC,OAAO,EAAE,IAAI,EAAE,iBAAiB,CAAC,OAAO,EAAE;YAC5E,KAAK,EAAE,aAAa,CAAC,KAAK;YAC1B,WAAW,EAAE,aAAa,CAAC,WAAW;YACtC,IAAI,EAAE,aAAa,CAAC,IAAI;YACxB,IAAI,EAAE,aAAa,CAAC,IAAI;YACxB,YAAY,EAAE,aAAa,CAAC,YAAY;YACxC,MAAM,EAAE,aAAa,CAAC,MAAM;YAC5B,UAAU,EAAE,aAAa,CAAC,UAAU;YACpC,aAAa,EAAE,EAAE;YACjB,cAAc,EAAE;gBACd,YAAY,EAAE;oBACZ,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,yBAAyB,CAAC,MAAM,EAAE,CAAC;oBACzG,UAAU,EAAE,EAAE;oBACd,SAAS,EAAE,EAAE;iBACd;aACF;YACD,eAAe,EAAE;gBACf,YAAY,EAAE;oBACZ,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,0BAA0B,CAAC,MAAM,EAAE,CAAC,EAAE;iBACrG;aACF;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GET.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-default/bp-routes/login/GET.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC5F,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-default/bp-routes/login/GET.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"POST.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-default/bp-routes/login/POST.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC5F,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-default/bp-routes/login/POST.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAAE,UAAU,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { HtmlRenderable } from "@betterportal/framework";
|
|
2
|
-
import type { ResponseData } from "../
|
|
2
|
+
import type { ResponseData } from "../route.impl.js";
|
|
3
3
|
export declare function render(data: ResponseData): HtmlRenderable;
|
|
4
|
-
//# sourceMappingURL=
|
|
4
|
+
//# sourceMappingURL=GET.d.ts.map
|
package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/GET.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GET.d.ts","sourceRoot":"","sources":["../../../../../../src/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/GET.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAgDrD,wBAAgB,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,cAAc,CAgHzD"}
|
|
@@ -78,4 +78,4 @@ export function render(data) {
|
|
|
78
78
|
}
|
|
79
79
|
return (_jsxs("div", { class: "container py-5", style: "max-width: 420px;", children: [_jsx("div", { class: "card border-0 shadow-sm", children: _jsxs("div", { class: "card-body", children: [_jsx("h3", { class: "card-title mb-1 text-center", children: "Sign in" }), _jsx("p", { class: "text-secondary text-center small mb-4", children: "BetterPortal admin" }), _jsxs("form", { id: "bp-login-form", "hx-post": "this", "hx-headers": '{"Accept":"application/json"}', "hx-swap": "none", onsubmit: "return window.bpLoginSubmit ? window.bpLoginSubmit(event) : false", "hx-on::response-error": "const xhr=event.detail.xhr;let body=null;try{body=JSON.parse(xhr.responseText)}catch(e){};const errEl=document.getElementById('bp-login-error');if(errEl){errEl.textContent=(body&&body.message)||('Login failed (HTTP '+xhr.status+')');errEl.classList.remove('d-none')}", children: [_jsxs("div", { class: "mb-3", children: [_jsx("label", { class: "form-label", children: "Username *" }), _jsx("input", { type: "text", class: "form-control", name: "username", autocomplete: "username", required: true, autofocus: true })] }), _jsxs("div", { class: "mb-3", children: [_jsx("label", { class: "form-label", children: "Password *" }), _jsx("input", { type: "password", class: "form-control", name: "password", autocomplete: "current-password", required: true })] }), _jsx("input", { type: "hidden", name: "next", value: "" }), _jsx("div", { class: "alert alert-danger d-none", id: "bp-login-error" }), _jsx("button", { type: "submit", class: "btn btn-primary w-100", children: "Sign in" })] })] }) }), _jsx("script", { children: loginScript() })] }));
|
|
80
80
|
}
|
|
81
|
-
//# sourceMappingURL=
|
|
81
|
+
//# sourceMappingURL=GET.js.map
|
package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/GET.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GET.js","sourceRoot":"","sources":["../../../../../../src/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/GET.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAChC,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAI9B,SAAS,WAAW;IAClB,2EAA2E;IAC3E,2DAA2D;IAC3D,OAAO,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwCL,CAAC,CAAC;AACT,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,IAAkB;IACvC,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;QACnB,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,IAAI,GAAG,CAAC;QACjC,OAAO,CACL,cAAK,KAAK,EAAC,gBAAgB,EAAC,KAAK,EAAC,mBAAmB,YACnD,cAAK,KAAK,EAAC,yBAAyB,YAClC,eAAK,KAAK,EAAC,uBAAuB,aAChC,aAAI,KAAK,EAAC,iBAAiB,2BAAgB,EAC3C,YAAG,KAAK,EAAC,2BAA2B,0CAA8B,EAClE,YAAG,KAAK,EAAC,uBAAuB,EAAC,IAAI,EAAE,IAAI,yBAAc,IACrD,GACF,GACF,CACP,CAAC;IACJ,CAAC;IAED,8EAA8E;IAC9E,+DAA+D;IAC/D,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;QAClD,OAAO,CACL,wBACU,IAAI,CAAC,aAAa,gBACf,MAAM,eACP,UAAU,aACZ,WAAW,iBACP,WAAW,YAEvB,cAAK,KAAK,EAAC,oCAAoC,YAC7C,cAAK,KAAK,EAAC,gBAAgB,EAAC,IAAI,EAAC,QAAQ,YAAC,eAAM,KAAK,EAAC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CAAC;IACJ,CAAC;IAED,OAAO,CACL,eAAK,KAAK,EAAC,gBAAgB,EAAC,KAAK,EAAC,mBAAmB,aACnD,cAAK,KAAK,EAAC,yBAAyB,YAClC,eAAK,KAAK,EAAC,WAAW,aACpB,aAAI,KAAK,EAAC,6BAA6B,wBAAa,EACpD,YAAG,KAAK,EAAC,uCAAuC,mCAAuB,EACvE,gBACE,EAAE,EAAC,eAAe,aACV,MAAM,gBACH,+BAA+B,aAClC,MAAM,EACd,QAAQ,EAAC,mEAAmE,EAE1E,uBAAuB,EAAE,4QAA4Q,aAGvS,eAAK,KAAK,EAAC,MAAM,aACf,gBAAO,KAAK,EAAC,YAAY,2BAAmB,EAC5C,gBAAO,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,cAAc,EAAC,IAAI,EAAC,UAAU,EAAC,YAAY,EAAC,UAAU,EAAC,QAAQ,QAAC,SAAS,SAAG,IACjG,EACN,eAAK,KAAK,EAAC,MAAM,aACf,gBAAO,KAAK,EAAC,YAAY,2BAAmB,EAC5C,gBAAO,IAAI,EAAC,UAAU,EAAC,KAAK,EAAC,cAAc,EAAC,IAAI,EAAC,UAAU,EAAC,YAAY,EAAC,kBAAkB,EAAC,QAAQ,SAAG,IACnG,EACN,gBAAO,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,EAAE,GAAG,EAC5C,cAAK,KAAK,EAAC,2BAA2B,EAAC,EAAE,EAAC,gBAAgB,GAAO,EACjE,iBAAQ,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,uBAAuB,wBAAiB,IAC/D,IACH,GACF,EACN,2BAAS,WAAW,EAAE,GAAU,IAC5B,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsxImportSource jsx-htmx */
|
|
2
2
|
import type { HtmlRenderable } from "@betterportal/framework";
|
|
3
|
-
import type { ResponseData } from "../
|
|
3
|
+
import type { ResponseData } from "../route.impl.js";
|
|
4
4
|
export declare function render(data: ResponseData): HtmlRenderable;
|
|
5
|
-
//# sourceMappingURL=_nav.profile.d.ts.map
|
|
5
|
+
//# sourceMappingURL=_nav.profile.GET.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_nav.profile.GET.d.ts","sourceRoot":"","sources":["../../../../../../src/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/_nav.profile.GET.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,wBAAgB,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,cAAc,CA4BzD"}
|
|
@@ -7,4 +7,4 @@ export function render(data) {
|
|
|
7
7
|
const detail = data.user.email || data.user.username || displayName;
|
|
8
8
|
return (_jsxs("div", { class: "dropdown", children: [_jsx("button", { class: "btn btn-sm btn-light dropdown-toggle", type: "button", "data-bs-toggle": "dropdown", "aria-expanded": "false", children: displayName }), _jsxs("ul", { class: "dropdown-menu dropdown-menu-end", children: [_jsx("li", { children: _jsx("h6", { class: "dropdown-header", children: detail }) }), _jsx("li", { children: _jsx("hr", { class: "dropdown-divider" }) }), _jsx("li", { children: _jsx("a", { class: "dropdown-item", href: "/login?action=logout", children: "Logout" }) })] })] }));
|
|
9
9
|
}
|
|
10
|
-
//# sourceMappingURL=_nav.profile.js.map
|
|
10
|
+
//# sourceMappingURL=_nav.profile.GET.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_nav.profile.GET.js","sourceRoot":"","sources":["../../../../../../src/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/_nav.profile.GET.tsx"],"names":[],"mappings":";AAIA,MAAM,UAAU,MAAM,CAAC,IAAkB;IACvC,IAAI,CAAC,IAAI,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QACxC,OAAO,CACL,YAAG,KAAK,EAAC,wBAAwB,EAAC,IAAI,EAAC,QAAQ,wBAE3C,CACL,CAAC;IACJ,CAAC;IAED,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,SAAS,CAAC;IACzF,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,WAAW,CAAC;IAEpE,OAAO,CACL,eAAK,KAAK,EAAC,UAAU,aACnB,iBAAQ,KAAK,EAAC,sCAAsC,EAAC,IAAI,EAAC,QAAQ,oBAAgB,UAAU,mBAAe,OAAO,YAC/G,WAAW,GACL,EACT,cAAI,KAAK,EAAC,iCAAiC,aACzC,uBAAI,aAAI,KAAK,EAAC,iBAAiB,YAAE,MAAM,GAAM,GAAK,EAClD,uBAAI,aAAI,KAAK,EAAC,kBAAkB,GAAG,GAAK,EACxC,uBACI,YAAG,KAAK,EAAC,eAAe,EAAC,IAAI,EAAC,sBAAsB,uBAEhD,GACH,IACF,IACD,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,89 +1,2 @@
|
|
|
1
|
-
|
|
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
|
-
}>;
|
|
8
|
-
export declare const HeadersSchema: av.ObjectSchema<{}>;
|
|
9
|
-
export declare const RequestSchema: av.ObjectSchema<{
|
|
10
|
-
username: av.StringSchema;
|
|
11
|
-
password: av.StringSchema;
|
|
12
|
-
next: av.OptionalSchema<av.StringSchema>;
|
|
13
|
-
}>;
|
|
14
|
-
export declare const ResponseSchema: av.ObjectSchema<{
|
|
15
|
-
status: av.EnumSchema<readonly ["ok", "error"]>;
|
|
16
|
-
message: av.OptionalSchema<av.StringSchema>;
|
|
17
|
-
accessToken: av.OptionalSchema<av.StringSchema>;
|
|
18
|
-
refreshToken: av.OptionalSchema<av.StringSchema>;
|
|
19
|
-
expiresInSeconds: av.OptionalSchema<av.IntSchema>;
|
|
20
|
-
user: av.OptionalSchema<av.ObjectSchema<{
|
|
21
|
-
id: av.StringSchema;
|
|
22
|
-
username: av.StringSchema;
|
|
23
|
-
email: av.OptionalSchema<av.StringSchema>;
|
|
24
|
-
name: av.OptionalSchema<av.StringSchema>;
|
|
25
|
-
}>>;
|
|
26
|
-
requiresFirstAdmin: av.OptionalSchema<av.BoolSchema>;
|
|
27
|
-
firstAdminUrl: av.OptionalSchema<av.StringSchema>;
|
|
28
|
-
alreadyLoggedIn: av.OptionalSchema<av.BoolSchema>;
|
|
29
|
-
loggedOut: av.OptionalSchema<av.BoolSchema>;
|
|
30
|
-
logoutUrl: av.OptionalSchema<av.StringSchema>;
|
|
31
|
-
nextUrl: av.OptionalSchema<av.StringSchema>;
|
|
32
|
-
}>;
|
|
33
|
-
export type ResponseData = Infer<typeof ResponseSchema>;
|
|
34
|
-
export declare const title = "Login";
|
|
35
|
-
export declare const description = "Authenticate with username and password to receive a JWT.";
|
|
36
|
-
export declare const role = "auth.login";
|
|
37
|
-
export declare const dependencies: string[];
|
|
38
|
-
export declare const chrome: BetterPortalRouteChrome;
|
|
39
|
-
export declare const auth: ApiAuthRequirement;
|
|
40
|
-
export declare const cacheHints: CacheHints;
|
|
41
|
-
export declare const handleGet: import("@betterportal/framework").RouteHandler<Record<string, string>, {
|
|
42
|
-
action?: string | undefined;
|
|
43
|
-
next?: string | undefined;
|
|
44
|
-
}, Record<string, string>, Record<string, unknown>, {
|
|
45
|
-
status: "ok" | "error";
|
|
46
|
-
message?: string | undefined;
|
|
47
|
-
accessToken?: string | undefined;
|
|
48
|
-
refreshToken?: string | undefined;
|
|
49
|
-
expiresInSeconds?: number | undefined;
|
|
50
|
-
user?: {
|
|
51
|
-
id: string;
|
|
52
|
-
username: string;
|
|
53
|
-
email?: string | undefined;
|
|
54
|
-
name?: string | undefined;
|
|
55
|
-
} | undefined;
|
|
56
|
-
requiresFirstAdmin?: boolean | undefined;
|
|
57
|
-
firstAdminUrl?: string | undefined;
|
|
58
|
-
alreadyLoggedIn?: boolean | undefined;
|
|
59
|
-
loggedOut?: boolean | undefined;
|
|
60
|
-
logoutUrl?: string | undefined;
|
|
61
|
-
nextUrl?: string | undefined;
|
|
62
|
-
}, unknown, Record<string, unknown>>;
|
|
63
|
-
export declare const handlePost: import("@betterportal/framework").RouteHandler<Record<string, string>, {
|
|
64
|
-
action?: string | undefined;
|
|
65
|
-
next?: string | undefined;
|
|
66
|
-
}, Record<string, string>, {
|
|
67
|
-
username: string;
|
|
68
|
-
password: string;
|
|
69
|
-
next?: string | undefined;
|
|
70
|
-
}, {
|
|
71
|
-
status: "ok" | "error";
|
|
72
|
-
message?: string | undefined;
|
|
73
|
-
accessToken?: string | undefined;
|
|
74
|
-
refreshToken?: string | undefined;
|
|
75
|
-
expiresInSeconds?: number | undefined;
|
|
76
|
-
user?: {
|
|
77
|
-
id: string;
|
|
78
|
-
username: string;
|
|
79
|
-
email?: string | undefined;
|
|
80
|
-
name?: string | undefined;
|
|
81
|
-
} | undefined;
|
|
82
|
-
requiresFirstAdmin?: boolean | undefined;
|
|
83
|
-
firstAdminUrl?: string | undefined;
|
|
84
|
-
alreadyLoggedIn?: boolean | undefined;
|
|
85
|
-
loggedOut?: boolean | undefined;
|
|
86
|
-
logoutUrl?: string | undefined;
|
|
87
|
-
nextUrl?: string | undefined;
|
|
88
|
-
}, unknown, Record<string, unknown>>;
|
|
1
|
+
export { title, description, auth, role, dependencies, chrome, cacheHints } from "./route.impl.js";
|
|
89
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-default/bp-routes/login/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-default/bp-routes/login/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,186 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { createHandler } from "@betterportal/framework";
|
|
3
|
-
import { resolveDefaultAuthAppConfig } from "../../index.js";
|
|
4
|
-
export const QuerySchema = av.object({
|
|
5
|
-
action: av.optional(av.string()).describe("Optional login route action, currently supports logout."),
|
|
6
|
-
next: av.optional(av.string()).describe("The view path that redirected to the login page and should be redirected back to after a successful login.")
|
|
7
|
-
}, { unknownKeys: "strip" });
|
|
8
|
-
export const HeadersSchema = av.object({}, { unknownKeys: "strip" });
|
|
9
|
-
export const RequestSchema = av.object({
|
|
10
|
-
username: av.string().minLength(1).describe("Username for the account signing in."),
|
|
11
|
-
password: av.string().minLength(1).describe("Password for the account signing in."),
|
|
12
|
-
next: av.optional(av.string()).describe("The view path to soft-navigate to after a successful login.")
|
|
13
|
-
}, { unknownKeys: "strip" });
|
|
14
|
-
export const ResponseSchema = av.object({
|
|
15
|
-
status: av.enum_(["ok", "error"]).describe("Login request outcome."),
|
|
16
|
-
message: av.optional(av.string()).describe("Human-readable status or error message for the renderer."),
|
|
17
|
-
accessToken: av.optional(av.string()).describe("Signed JWT access token returned on successful login."),
|
|
18
|
-
refreshToken: av.optional(av.string()).describe("Signed JWT refresh token returned on successful login."),
|
|
19
|
-
expiresInSeconds: av.optional(av.int().min(1)).describe("Access token lifetime in seconds."),
|
|
20
|
-
user: av.optional(av.object({
|
|
21
|
-
id: av.string().describe("Stable UUIDv7 user id."),
|
|
22
|
-
username: av.string().describe("Account username."),
|
|
23
|
-
email: av.optional(av.string()).describe("User email address, when set."),
|
|
24
|
-
name: av.optional(av.string()).describe("Display name, when set.")
|
|
25
|
-
}, { unknownKeys: "strip" }).describe("Authenticated user summary.")),
|
|
26
|
-
// True while the auth service has zero users - the theme renderer redirects
|
|
27
|
-
// to the register view (first-admin setup) instead of showing the login form.
|
|
28
|
-
requiresFirstAdmin: av.optional(av.bool()).describe("True while the auth service has zero users; the theme renderer should redirect to first-admin registration instead of showing the login form."),
|
|
29
|
-
// Absolute URL of this auth service's register view (self-origin). Provided so
|
|
30
|
-
// the theme renderer can load it in-shell without knowing the auth origin.
|
|
31
|
-
firstAdminUrl: av.optional(av.string()).describe("Absolute self-origin URL of this auth service's register view so the theme can load it in-shell without knowing the auth origin."),
|
|
32
|
-
// True when the GET request already carried a valid access token - the theme
|
|
33
|
-
// renderer shows a "signed in" state instead of the login form.
|
|
34
|
-
alreadyLoggedIn: av.optional(av.bool()).describe("True when the GET request already carried a valid access token; the theme renderer should show a signed-in state instead of the login form."),
|
|
35
|
-
loggedOut: av.optional(av.bool()).describe("True after the login route handled ?action=logout."),
|
|
36
|
-
// Tenant-app path of the logout view (app config auth.logoutViewId).
|
|
37
|
-
logoutUrl: av.optional(av.string()).describe("Tenant-app path of the logout view from app auth config."),
|
|
38
|
-
// Echo of ?next= when already signed in - the theme renderer redirects there
|
|
39
|
-
// immediately instead of showing the signed-in card.
|
|
40
|
-
nextUrl: av.optional(av.string()).describe("Echo of the next path when already signed in; the theme renderer should redirect there immediately.")
|
|
41
|
-
}, { unknownKeys: "strip" });
|
|
42
|
-
export const title = "Login";
|
|
43
|
-
export const description = "Authenticate with username and password to receive a JWT.";
|
|
44
|
-
export const role = "auth.login";
|
|
45
|
-
export const dependencies = ["logout.index", "refresh.index", "register.index"];
|
|
46
|
-
export const chrome = { fullScreen: true };
|
|
47
|
-
export const auth = {
|
|
48
|
-
required: false,
|
|
49
|
-
permissions: []
|
|
50
|
-
};
|
|
51
|
-
export const cacheHints = {
|
|
52
|
-
ttlSeconds: 0,
|
|
53
|
-
varyBy: []
|
|
54
|
-
};
|
|
55
|
-
function runtimeFrom(ctx) {
|
|
56
|
-
const runtime = ctx.plugin?.runtime;
|
|
57
|
-
if (!runtime)
|
|
58
|
-
throw new Error("Auth runtime not available on handler context");
|
|
59
|
-
return runtime;
|
|
60
|
-
}
|
|
61
|
-
function normalizeRedirect(raw) {
|
|
62
|
-
const redirect = raw?.trim();
|
|
63
|
-
if (!redirect)
|
|
64
|
-
return "/";
|
|
65
|
-
if (redirect.startsWith("http://") || redirect.startsWith("https://"))
|
|
66
|
-
return redirect;
|
|
67
|
-
return redirect.startsWith("/") ? redirect : `/${redirect}`;
|
|
68
|
-
}
|
|
69
|
-
export const handleGet = createHandler({ response: ResponseSchema, query: QuerySchema }, (ctx) => {
|
|
70
|
-
const runtime = runtimeFrom(ctx);
|
|
71
|
-
const requiresFirstAdmin = runtime.userStore.hasNoUsers();
|
|
72
|
-
if (ctx.query.action === "logout") {
|
|
73
|
-
const config = resolveDefaultAuthAppConfig(ctx.config);
|
|
74
|
-
const nextUrl = normalizeRedirect(config.logoutRedirectPath);
|
|
75
|
-
ctx.bpHeaders?.remove("Authorization");
|
|
76
|
-
ctx.bpHeaders?.remove("X-BP-Refresh");
|
|
77
|
-
if (ctx.serviceId)
|
|
78
|
-
ctx.responseHeaders?.set("HX-Trigger", `bp:fragments:${ctx.serviceId}`);
|
|
79
|
-
return {
|
|
80
|
-
status: "ok",
|
|
81
|
-
message: "Signed out.",
|
|
82
|
-
loggedOut: true,
|
|
83
|
-
nextUrl
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
// Valid token already on the request - no point rendering a login form.
|
|
87
|
-
// First-admin setup still wins: a token can outlive a wiped user store.
|
|
88
|
-
if (ctx.user && !requiresFirstAdmin) {
|
|
89
|
-
const config = resolveDefaultAuthAppConfig(ctx.config);
|
|
90
|
-
const next = ctx.query.next || config.loginRedirectPath;
|
|
91
|
-
return {
|
|
92
|
-
status: "ok",
|
|
93
|
-
message: "Already signed in.",
|
|
94
|
-
alreadyLoggedIn: true,
|
|
95
|
-
user: {
|
|
96
|
-
id: ctx.user.sub,
|
|
97
|
-
username: ctx.user.name ?? ctx.user.email ?? ctx.user.sub,
|
|
98
|
-
email: ctx.user.email,
|
|
99
|
-
name: ctx.user.name
|
|
100
|
-
},
|
|
101
|
-
logoutUrl: "/login?action=logout",
|
|
102
|
-
...(next ? { nextUrl: next } : {})
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
let firstAdminUrl;
|
|
106
|
-
if (requiresFirstAdmin) {
|
|
107
|
-
const host = ctx.headers.host;
|
|
108
|
-
if (host) {
|
|
109
|
-
const proto = ctx.headers["x-forwarded-proto"] ?? "http";
|
|
110
|
-
const next = ctx.query.next;
|
|
111
|
-
firstAdminUrl = `${proto}://${host}/register${next ? `?next=${encodeURIComponent(next)}` : ""}`;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
return {
|
|
115
|
-
status: "ok",
|
|
116
|
-
message: "Submit username + password via POST to authenticate.",
|
|
117
|
-
requiresFirstAdmin,
|
|
118
|
-
...(firstAdminUrl ? { firstAdminUrl } : {})
|
|
119
|
-
};
|
|
120
|
-
});
|
|
121
|
-
export const handlePost = createHandler({ response: ResponseSchema, request: RequestSchema, query: QuerySchema }, async (ctx) => {
|
|
122
|
-
const runtime = runtimeFrom(ctx);
|
|
123
|
-
const tenantId = ctx.tenant.id;
|
|
124
|
-
const appId = ctx.app.id;
|
|
125
|
-
const body = ctx.request;
|
|
126
|
-
const user = await runtime.userStore.authenticate(tenantId, appId, body.username, body.password);
|
|
127
|
-
if (!user) {
|
|
128
|
-
// Auth failures are 401, not 200-with-error-body.
|
|
129
|
-
ctx.setStatus?.(401);
|
|
130
|
-
return {
|
|
131
|
-
status: "error",
|
|
132
|
-
message: "Invalid username or password."
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
const issued = runtime.tokenIssuer.issueTokenPair({
|
|
136
|
-
sub: user.id,
|
|
137
|
-
tenantId: user.tenantId,
|
|
138
|
-
appId,
|
|
139
|
-
roles: user.roles,
|
|
140
|
-
name: user.name ?? user.username,
|
|
141
|
-
email: user.email,
|
|
142
|
-
picture: user.picture
|
|
143
|
-
});
|
|
144
|
-
if (!issued.refreshToken) {
|
|
145
|
-
throw new Error("Auth token issuer did not return a refresh token");
|
|
146
|
-
}
|
|
147
|
-
// Login is rendered in the theme's auth-only page state. After credentials
|
|
148
|
-
// are stored, navigate the browser back to the tenant route so the normal
|
|
149
|
-
// shell is rendered from a clean page request.
|
|
150
|
-
const config = resolveDefaultAuthAppConfig(ctx.config);
|
|
151
|
-
const next = body.next || ctx.query.next || config.loginRedirectPath || "/";
|
|
152
|
-
ctx.responseHeaders?.set("HX-Redirect", next);
|
|
153
|
-
// Auth state changed - reload this service's fragments (nav profile etc.).
|
|
154
|
-
// Fragments listening on this key re-fetch; absent fragments ignore it.
|
|
155
|
-
if (ctx.serviceId) {
|
|
156
|
-
ctx.responseHeaders?.set("HX-Trigger", `bp:fragments:${ctx.serviceId}`);
|
|
157
|
-
}
|
|
158
|
-
// Expire the stored header with the ACCESS token, not the refresh token -
|
|
159
|
-
// otherwise the client replays a dead JWT for days. The refresh token is
|
|
160
|
-
// stored separately so the profile fragment can renew before expiry.
|
|
161
|
-
ctx.bpHeaders?.set('Authorization', `Bearer ${issued.accessToken}`, {
|
|
162
|
-
expiresInSeconds: issued.accessTokenExpiresInSeconds,
|
|
163
|
-
locked: true,
|
|
164
|
-
refreshPath: "/refresh",
|
|
165
|
-
refreshBeforeSeconds: 60
|
|
166
|
-
});
|
|
167
|
-
ctx.bpHeaders?.set('X-BP-Refresh', issued.refreshToken, {
|
|
168
|
-
expiresInSeconds: issued.refreshTokenExpiresInSeconds ?? runtime.refreshTokenSeconds,
|
|
169
|
-
locked: true,
|
|
170
|
-
scopeToOwner: true
|
|
171
|
-
});
|
|
172
|
-
return {
|
|
173
|
-
status: "ok",
|
|
174
|
-
message: "logged in",
|
|
175
|
-
accessToken: issued.accessToken,
|
|
176
|
-
refreshToken: issued.refreshToken,
|
|
177
|
-
expiresInSeconds: issued.accessTokenExpiresInSeconds,
|
|
178
|
-
user: {
|
|
179
|
-
id: user.id,
|
|
180
|
-
username: user.username,
|
|
181
|
-
email: user.email,
|
|
182
|
-
name: user.name ?? user.username
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
});
|
|
1
|
+
export { title, description, auth, role, dependencies, chrome, cacheHints } from "./route.impl.js";
|
|
186
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-default/bp-routes/login/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-default/bp-routes/login/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|