@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.
Files changed (96) hide show
  1. package/lib/plugins/service-betterportal-auth-default/.bp-generated/registry.d.ts.map +1 -1
  2. package/lib/plugins/service-betterportal-auth-default/.bp-generated/registry.js +77 -31
  3. package/lib/plugins/service-betterportal-auth-default/.bp-generated/registry.js.map +1 -1
  4. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/GET.d.ts +3 -0
  5. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/GET.d.ts.map +1 -0
  6. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/GET.js +3 -0
  7. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/GET.js.map +1 -0
  8. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/POST.d.ts +3 -0
  9. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/POST.d.ts.map +1 -0
  10. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/POST.js +3 -0
  11. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/POST.js.map +1 -0
  12. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/{index.d.ts → GET.d.ts} +2 -2
  13. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/GET.d.ts.map +1 -0
  14. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/{index.js → GET.js} +1 -1
  15. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/GET.js.map +1 -0
  16. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/{_nav.profile.d.ts → _nav.profile.GET.d.ts} +2 -2
  17. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/_nav.profile.GET.d.ts.map +1 -0
  18. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/{_nav.profile.js → _nav.profile.GET.js} +1 -1
  19. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/_nav.profile.GET.js.map +1 -0
  20. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/index.d.ts +1 -88
  21. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/index.d.ts.map +1 -1
  22. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/index.js +1 -185
  23. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/index.js.map +1 -1
  24. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/route.impl.d.ts +89 -0
  25. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/route.impl.d.ts.map +1 -0
  26. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/route.impl.js +186 -0
  27. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/route.impl.js.map +1 -0
  28. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/GET.d.ts +3 -0
  29. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/GET.d.ts.map +1 -0
  30. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/GET.js +3 -0
  31. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/GET.js.map +1 -0
  32. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/POST.d.ts +3 -0
  33. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/POST.d.ts.map +1 -0
  34. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/POST.js +3 -0
  35. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/POST.js.map +1 -0
  36. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/_theme.bootstrap1/{index.d.ts → GET.d.ts} +2 -2
  37. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/_theme.bootstrap1/GET.d.ts.map +1 -0
  38. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/_theme.bootstrap1/{index.js → GET.js} +1 -1
  39. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/_theme.bootstrap1/GET.js.map +1 -0
  40. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/index.d.ts +1 -24
  41. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/index.d.ts.map +1 -1
  42. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/index.js +1 -37
  43. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/index.js.map +1 -1
  44. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/route.impl.d.ts +25 -0
  45. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/route.impl.d.ts.map +1 -0
  46. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/route.impl.js +38 -0
  47. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/route.impl.js.map +1 -0
  48. package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/POST.d.ts +3 -0
  49. package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/POST.d.ts.map +1 -0
  50. package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/POST.js +3 -0
  51. package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/POST.js.map +1 -0
  52. package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/index.d.ts +1 -30
  53. package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/index.d.ts.map +1 -1
  54. package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/index.js +1 -91
  55. package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/index.js.map +1 -1
  56. package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/route.impl.d.ts +31 -0
  57. package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/route.impl.d.ts.map +1 -0
  58. package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/route.impl.js +92 -0
  59. package/lib/plugins/service-betterportal-auth-default/bp-routes/refresh/route.impl.js.map +1 -0
  60. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/GET.d.ts +3 -0
  61. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/GET.d.ts.map +1 -0
  62. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/GET.js +3 -0
  63. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/GET.js.map +1 -0
  64. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/POST.d.ts +3 -0
  65. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/POST.d.ts.map +1 -0
  66. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/POST.js +3 -0
  67. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/POST.js.map +1 -0
  68. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/{index.400.js → 400.d.ts} +2 -2
  69. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/400.d.ts.map +1 -0
  70. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/{index.400.d.ts → 400.js} +2 -2
  71. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/400.js.map +1 -0
  72. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/{index.d.ts → GET.d.ts} +2 -2
  73. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/GET.d.ts.map +1 -0
  74. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/{index.js → GET.js} +1 -1
  75. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/GET.js.map +1 -0
  76. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/index.d.ts +1 -63
  77. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/index.d.ts.map +1 -1
  78. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/index.js +1 -105
  79. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/index.js.map +1 -1
  80. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/route.impl.d.ts +64 -0
  81. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/route.impl.d.ts.map +1 -0
  82. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/route.impl.js +106 -0
  83. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/route.impl.js.map +1 -0
  84. package/lib/schemas/service-betterportal-auth-default.json +1 -1
  85. package/lib/schemas/service-betterportal-auth-default.plugin.json +1 -1
  86. package/package.json +3 -3
  87. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/_nav.profile.d.ts.map +0 -1
  88. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/_nav.profile.js.map +0 -1
  89. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/index.d.ts.map +0 -1
  90. package/lib/plugins/service-betterportal-auth-default/bp-routes/login/_theme.bootstrap1/index.js.map +0 -1
  91. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/_theme.bootstrap1/index.d.ts.map +0 -1
  92. package/lib/plugins/service-betterportal-auth-default/bp-routes/logout/_theme.bootstrap1/index.js.map +0 -1
  93. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/index.400.d.ts.map +0 -1
  94. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/index.400.js.map +0 -1
  95. package/lib/plugins/service-betterportal-auth-default/bp-routes/register/_theme.bootstrap1/index.d.ts.map +0 -1
  96. 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":"AAUA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEpE,eAAO,MAAM,QAAQ,EAAE,oBA8GtB,CAAC"}
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 loginBootstrap1NavProfile from "../bp-routes/login/_theme.bootstrap1/_nav.profile.js";
4
- import * as loginBootstrap1Page from "../bp-routes/login/_theme.bootstrap1/index.js";
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 logoutBootstrap1Page from "../bp-routes/logout/_theme.bootstrap1/index.js";
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 registerBootstrap1PageS400 from "../bp-routes/register/_theme.bootstrap1/index.400.js";
10
- import * as registerBootstrap1Page from "../bp-routes/register/_theme.bootstrap1/index.js";
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: loginRoute.ResponseSchema,
20
- query: loginRoute.QuerySchema,
21
- headers: loginRoute.HeadersSchema,
22
- request: loginRoute.RequestSchema
26
+ response: loginGETRoute.ResponseSchema,
27
+ query: loginGETRoute.QuerySchema,
28
+ headers: loginGETRoute.HeadersSchema,
29
+ request: loginGETRoute.RequestSchema
23
30
  },
24
- handlers: { GET: loginRoute.handleGet, POST: loginRoute.handlePost },
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: loginBootstrap1Page.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: loginBootstrap1NavProfile.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: ["POST", "GET"],
62
+ methods: ["GET", "POST"],
45
63
  paramNames: [],
46
64
  schemas: {
47
- response: logoutRoute.ResponseSchema,
48
- query: logoutRoute.QuerySchema,
49
- headers: logoutRoute.HeadersSchema,
50
- request: logoutRoute.RequestSchema
65
+ response: logoutGETRoute.ResponseSchema,
66
+ query: logoutGETRoute.QuerySchema,
67
+ headers: logoutGETRoute.HeadersSchema,
68
+ request: logoutGETRoute.RequestSchema
51
69
  },
52
- handlers: { POST: logoutRoute.handlePost, GET: logoutRoute.handleGet },
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: logoutBootstrap1Page.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: refreshRoute.ResponseSchema,
74
- query: refreshRoute.QuerySchema,
75
- headers: refreshRoute.HeadersSchema,
76
- request: refreshRoute.RequestSchema
102
+ response: refreshPOSTRoute.ResponseSchema,
103
+ query: refreshPOSTRoute.QuerySchema,
104
+ headers: refreshPOSTRoute.HeadersSchema,
105
+ request: refreshPOSTRoute.RequestSchema
77
106
  },
78
- handlers: { POST: refreshRoute.handlePost },
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: registerRoute.ResponseSchema,
94
- query: registerRoute.QuerySchema,
95
- headers: registerRoute.HeadersSchema,
96
- request: registerRoute.RequestSchema
128
+ response: registerGETRoute.ResponseSchema,
129
+ query: registerGETRoute.QuerySchema,
130
+ headers: registerGETRoute.HeadersSchema,
131
+ request: registerGETRoute.RequestSchema
97
132
  },
98
- handlers: { GET: registerRoute.handleGet, POST: registerRoute.handlePost },
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: registerBootstrap1Page.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: { page: { rendererId: "default", type: "page", render: registerBootstrap1PageS400.render } }
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,yBAAyB,MAAM,sDAAsD,CAAC;AAClG,OAAO,KAAK,mBAAmB,MAAM,+CAA+C,CAAC;AACrF,OAAO,KAAK,WAAW,MAAM,8BAA8B,CAAC;AAC5D,OAAO,KAAK,oBAAoB,MAAM,gDAAgD,CAAC;AACvF,OAAO,KAAK,YAAY,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,aAAa,MAAM,gCAAgC,CAAC;AAChE,OAAO,KAAK,0BAA0B,MAAM,sDAAsD,CAAC;AACnG,OAAO,KAAK,sBAAsB,MAAM,kDAAkD,CAAC;AAG3F,MAAM,CAAC,MAAM,QAAQ,GAAyB;IAC5C,MAAM,EAAE;QACN;YACE,MAAM,EAAE,aAAa;YACrB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,CAAC,KAAK,EAAC,MAAM,CAAC;YACvB,UAAU,EAAE,EAAE;YACd,OAAO,EAAE;gBACP,QAAQ,EAAE,UAAU,CAAC,cAAc;gBACnC,KAAK,EAAE,UAAU,CAAC,WAAW;gBAC7B,OAAO,EAAE,UAAU,CAAC,aAAa;gBACjC,OAAO,EAAE,UAAU,CAAC,aAAa;aAClC;YACD,QAAQ,EAAE,EAAE,GAAG,EAAE,UAAU,CAAC,SAAS,EAAE,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AAa,CAAC,UAAU,EAAE;YAC1E,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,sBAAsB,CAAC,MAAM,EAAE,CAAC;oBACvF,UAAU,EAAE,EAAE;oBACd,SAAS,EAAE,EAAE;iBACd;aACF;YACD,eAAe,EAAE;gBACf,YAAY,EAAE;oBACZ,GAAG,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,0BAA0B,CAAC,MAAM,EAAE,EAAE;iBAClG;aACF;SACF;KACF;CACF,CAAC"}
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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AAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE;wBACvE,QAAQ,EAAE,iBAAiB,CAAC,cAAc;wBAC1C,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,3 @@
1
+ export { ResponseSchema, QuerySchema, HeadersSchema, RequestSchema } from "./route.impl.js";
2
+ export { handleGet as default } from "./route.impl.js";
3
+ //# sourceMappingURL=GET.d.ts.map
@@ -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,3 @@
1
+ export { ResponseSchema, QuerySchema, HeadersSchema, RequestSchema } from "./route.impl.js";
2
+ export { handleGet as default } from "./route.impl.js";
3
+ //# sourceMappingURL=GET.js.map
@@ -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,3 @@
1
+ export { ResponseSchema, QuerySchema, HeadersSchema, RequestSchema } from "./route.impl.js";
2
+ export { handlePost as default } from "./route.impl.js";
3
+ //# sourceMappingURL=POST.d.ts.map
@@ -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,3 @@
1
+ export { ResponseSchema, QuerySchema, HeadersSchema, RequestSchema } from "./route.impl.js";
2
+ export { handlePost as default } from "./route.impl.js";
3
+ //# sourceMappingURL=POST.js.map
@@ -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 "../index.js";
2
+ import type { ResponseData } from "../route.impl.js";
3
3
  export declare function render(data: ResponseData): HtmlRenderable;
4
- //# sourceMappingURL=index.d.ts.map
4
+ //# sourceMappingURL=GET.d.ts.map
@@ -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=index.js.map
81
+ //# sourceMappingURL=GET.js.map
@@ -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,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,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 "../index.js";
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
- 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
- }>;
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,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;AAIjC,eAAO,MAAM,WAAW;;;EAGI,CAAC;AAE7B,eAAO,MAAM,aAAa,qBAA0C,CAAC;AAErE,eAAO,MAAM,aAAa;;;;EAIE,CAAC;AAE7B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;EA2BC,CAAC;AAC7B,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAExD,eAAO,MAAM,KAAK,UAAU,CAAC;AAC7B,eAAO,MAAM,WAAW,8DAA8D,CAAC;AACvF,eAAO,MAAM,IAAI,eAAe,CAAC;AACjC,eAAO,MAAM,YAAY,UAAsD,CAAC;AAChF,eAAO,MAAM,MAAM,EAAE,uBAA8C,CAAC;AAEpE,eAAO,MAAM,IAAI,EAAE,kBAGlB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAGxB,CAAC;AAeF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;oCAuDrB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;oCA6EtB,CAAC"}
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
- import * as av from "anyvali";
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,KAAK,EAAE,MAAM,SAAS,CAAC;AAE9B,OAAO,EACL,aAAa,EAId,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAE7D,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC,MAAM,CAAC;IACnC,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,yDAAyD,CAAC;IACpG,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,4GAA4G,CAAC;CACtJ,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC;AAE7B,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,CAAC,MAAM,CAAC;IACrC,QAAQ,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC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G,CAAC,eAAe,EAAE,UAAU,MAAM,CAAC,WAAW,EAAE,EAAE;QAClE,gBAAgB,EAAE,MAAM,CAAC,2BAA2B;QACpD,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,UAAU;QACvB,oBAAoB,EAAE,EAAE;KACzB,CAAC,CAAC;IACH,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,cAAc,EAAE,MAAM,CAAC,YAAY,EAAE;QACtD,gBAAgB,EAAE,MAAM,CAAC,4BAA4B,IAAI,OAAO,CAAC,mBAAmB;QACpF,MAAM,EAAE,IAAI;QACZ,YAAY,EAAE,IAAI;KACnB,CAAC,CAAC;IAEH,OAAO;QACL,MAAM,EAAE,IAAa;QACrB,OAAO,EAAE,WAAW;QACpB,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,gBAAgB,EAAE,MAAM,CAAC,2BAA2B;QACpD,IAAI,EAAE;YACJ,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ;SACjC;KACF,CAAC;AACJ,CAAC,CACF,CAAC"}
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"}