@intuitionrobotics/user-account 0.47.59 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/LICENSE +3 -0
  2. package/dist/app-backend/api/_user-account.d.ts +4 -0
  3. package/dist/app-backend/api/_user-account.d.ts.map +1 -0
  4. package/dist/app-backend/api/_user-account.js +3 -0
  5. package/{app-backend → dist/app-backend}/api/_user-account.js.map +1 -1
  6. package/{app-backend → dist/app-backend}/api/v1/account/_assert.d.ts +3 -2
  7. package/dist/app-backend/api/v1/account/_assert.d.ts.map +1 -0
  8. package/dist/app-backend/api/v1/account/_assert.js +12 -0
  9. package/dist/app-backend/api/v1/account/_assert.js.map +1 -0
  10. package/dist/app-backend/api/v1/account/_imports.d.ts +5 -0
  11. package/dist/app-backend/api/v1/account/_imports.d.ts.map +1 -0
  12. package/dist/app-backend/api/v1/account/_imports.js +6 -0
  13. package/{app-backend → dist/app-backend}/api/v1/account/_imports.js.map +1 -1
  14. package/dist/app-backend/api/v1/account/create.d.ts +10 -0
  15. package/dist/app-backend/api/v1/account/create.d.ts.map +1 -0
  16. package/dist/app-backend/api/v1/account/create.js +16 -0
  17. package/dist/app-backend/api/v1/account/create.js.map +1 -0
  18. package/dist/app-backend/api/v1/account/list.d.ts +11 -0
  19. package/dist/app-backend/api/v1/account/list.d.ts.map +1 -0
  20. package/dist/app-backend/api/v1/account/list.js +14 -0
  21. package/dist/app-backend/api/v1/account/list.js.map +1 -0
  22. package/dist/app-backend/api/v1/account/login-saml.d.ts +12 -0
  23. package/dist/app-backend/api/v1/account/login-saml.d.ts.map +1 -0
  24. package/dist/app-backend/api/v1/account/login-saml.js +15 -0
  25. package/dist/app-backend/api/v1/account/login-saml.js.map +1 -0
  26. package/dist/app-backend/api/v1/account/login.d.ts +10 -0
  27. package/dist/app-backend/api/v1/account/login.d.ts.map +1 -0
  28. package/dist/app-backend/api/v1/account/login.js +15 -0
  29. package/dist/app-backend/api/v1/account/login.js.map +1 -0
  30. package/dist/app-backend/api/v1/account/logout.d.ts +10 -0
  31. package/dist/app-backend/api/v1/account/logout.d.ts.map +1 -0
  32. package/dist/app-backend/api/v1/account/logout.js +17 -0
  33. package/dist/app-backend/api/v1/account/logout.js.map +1 -0
  34. package/dist/app-backend/api/v1/account/upsert.d.ts +10 -0
  35. package/dist/app-backend/api/v1/account/upsert.d.ts.map +1 -0
  36. package/dist/app-backend/api/v1/account/upsert.js +18 -0
  37. package/dist/app-backend/api/v1/account/upsert.js.map +1 -0
  38. package/dist/app-backend/api/v1/account/validate.d.ts +13 -0
  39. package/dist/app-backend/api/v1/account/validate.d.ts.map +1 -0
  40. package/dist/app-backend/api/v1/account/validate.js +14 -0
  41. package/dist/app-backend/api/v1/account/validate.js.map +1 -0
  42. package/{app-backend → dist/app-backend}/apis/add-new-account.d.ts +4 -3
  43. package/dist/app-backend/apis/add-new-account.d.ts.map +1 -0
  44. package/dist/app-backend/apis/add-new-account.js +15 -0
  45. package/dist/app-backend/apis/add-new-account.js.map +1 -0
  46. package/dist/app-backend/core/module-pack.d.ts +4 -0
  47. package/dist/app-backend/core/module-pack.d.ts.map +1 -0
  48. package/dist/app-backend/core/module-pack.js +9 -0
  49. package/dist/app-backend/core/module-pack.js.map +1 -0
  50. package/{app-backend → dist/app-backend}/modules/AccountModule.d.ts +3 -2
  51. package/dist/app-backend/modules/AccountModule.d.ts.map +1 -0
  52. package/dist/app-backend/modules/AccountModule.js +341 -0
  53. package/dist/app-backend/modules/AccountModule.js.map +1 -0
  54. package/{app-backend → dist/app-backend}/modules/JWTBuilder.d.ts +3 -2
  55. package/dist/app-backend/modules/JWTBuilder.d.ts.map +1 -0
  56. package/dist/app-backend/modules/JWTBuilder.js +113 -0
  57. package/dist/app-backend/modules/JWTBuilder.js.map +1 -0
  58. package/{app-backend → dist/app-backend}/modules/SamlModule.d.ts +3 -2
  59. package/dist/app-backend/modules/SamlModule.d.ts.map +1 -0
  60. package/dist/app-backend/modules/SamlModule.js +47 -0
  61. package/dist/app-backend/modules/SamlModule.js.map +1 -0
  62. package/{app-backend → dist/app-backend}/modules/SecretsModule.d.ts +4 -3
  63. package/dist/app-backend/modules/SecretsModule.d.ts.map +1 -0
  64. package/dist/app-backend/modules/SecretsModule.js +131 -0
  65. package/dist/app-backend/modules/SecretsModule.js.map +1 -0
  66. package/{app-backend → dist/app-backend}/modules/_imports.d.ts +3 -2
  67. package/dist/app-backend/modules/_imports.d.ts.map +1 -0
  68. package/dist/app-backend/modules/_imports.js +3 -0
  69. package/{app-backend → dist/app-backend}/modules/_imports.js.map +1 -1
  70. package/dist/app-frontend/core/module-pack.d.ts +3 -0
  71. package/dist/app-frontend/core/module-pack.d.ts.map +1 -0
  72. package/dist/app-frontend/core/module-pack.js +6 -0
  73. package/dist/app-frontend/core/module-pack.js.map +1 -0
  74. package/{app-frontend → dist/app-frontend}/modules/AccountModule.d.ts +3 -2
  75. package/dist/app-frontend/modules/AccountModule.d.ts.map +1 -0
  76. package/dist/app-frontend/modules/AccountModule.js +151 -0
  77. package/dist/app-frontend/modules/AccountModule.js.map +1 -0
  78. package/{app-frontend → dist/app-frontend}/ui/Component_Login.d.ts +2 -1
  79. package/dist/app-frontend/ui/Component_Login.d.ts.map +1 -0
  80. package/dist/app-frontend/ui/Component_Login.js +63 -0
  81. package/dist/app-frontend/ui/Component_Login.js.map +1 -0
  82. package/{app-frontend → dist/app-frontend}/ui/Component_Register.d.ts +2 -1
  83. package/dist/app-frontend/ui/Component_Register.d.ts.map +1 -0
  84. package/dist/app-frontend/ui/Component_Register.js +69 -0
  85. package/dist/app-frontend/ui/Component_Register.js.map +1 -0
  86. package/dist/backend.d.ts +3 -0
  87. package/dist/backend.d.ts.map +1 -0
  88. package/dist/backend.js +3 -0
  89. package/dist/backend.js.map +1 -0
  90. package/dist/frontend.d.ts +4 -0
  91. package/dist/frontend.d.ts.map +1 -0
  92. package/dist/frontend.js +3 -0
  93. package/dist/frontend.js.map +1 -0
  94. package/dist/index.d.ts +3 -0
  95. package/dist/index.d.ts.map +1 -0
  96. package/dist/index.js +3 -0
  97. package/dist/index.js.map +1 -0
  98. package/{shared → dist/shared}/api.d.ts +2 -1
  99. package/dist/shared/api.d.ts.map +1 -0
  100. package/dist/shared/api.js +14 -0
  101. package/dist/shared/api.js.map +1 -0
  102. package/dist/shared/types.d.ts +2 -0
  103. package/dist/shared/types.d.ts.map +1 -0
  104. package/dist/shared/types.js +2 -0
  105. package/{shared → dist/shared}/utils/AuthenticationConsts.d.ts +1 -0
  106. package/dist/shared/utils/AuthenticationConsts.d.ts.map +1 -0
  107. package/dist/shared/utils/AuthenticationConsts.js +3 -0
  108. package/{shared → dist/shared}/utils/AuthenticationConsts.js.map +1 -1
  109. package/dist/tsconfig.tsbuildinfo +1 -0
  110. package/package.json +64 -15
  111. package/app-backend/api/_user-account.d.ts +0 -1
  112. package/app-backend/api/_user-account.js +0 -5
  113. package/app-backend/api/v1/account/_assert.js +0 -27
  114. package/app-backend/api/v1/account/_assert.js.map +0 -1
  115. package/app-backend/api/v1/account/_imports.d.ts +0 -4
  116. package/app-backend/api/v1/account/_imports.js +0 -22
  117. package/app-backend/api/v1/account/create.d.ts +0 -1
  118. package/app-backend/api/v1/account/create.js +0 -28
  119. package/app-backend/api/v1/account/create.js.map +0 -1
  120. package/app-backend/api/v1/account/list.d.ts +0 -1
  121. package/app-backend/api/v1/account/list.js +0 -27
  122. package/app-backend/api/v1/account/list.js.map +0 -1
  123. package/app-backend/api/v1/account/login-saml.d.ts +0 -1
  124. package/app-backend/api/v1/account/login-saml.js +0 -27
  125. package/app-backend/api/v1/account/login-saml.js.map +0 -1
  126. package/app-backend/api/v1/account/login.d.ts +0 -1
  127. package/app-backend/api/v1/account/login.js +0 -27
  128. package/app-backend/api/v1/account/login.js.map +0 -1
  129. package/app-backend/api/v1/account/logout.d.ts +0 -1
  130. package/app-backend/api/v1/account/logout.js +0 -29
  131. package/app-backend/api/v1/account/logout.js.map +0 -1
  132. package/app-backend/api/v1/account/upsert.d.ts +0 -1
  133. package/app-backend/api/v1/account/upsert.js +0 -30
  134. package/app-backend/api/v1/account/upsert.js.map +0 -1
  135. package/app-backend/api/v1/account/validate.d.ts +0 -1
  136. package/app-backend/api/v1/account/validate.js +0 -27
  137. package/app-backend/api/v1/account/validate.js.map +0 -1
  138. package/app-backend/apis/add-new-account.js +0 -29
  139. package/app-backend/apis/add-new-account.js.map +0 -1
  140. package/app-backend/core/module-pack.d.ts +0 -3
  141. package/app-backend/core/module-pack.js +0 -26
  142. package/app-backend/core/module-pack.js.map +0 -1
  143. package/app-backend/modules/AccountModule.js +0 -395
  144. package/app-backend/modules/AccountModule.js.map +0 -1
  145. package/app-backend/modules/JWTBuilder.js +0 -116
  146. package/app-backend/modules/JWTBuilder.js.map +0 -1
  147. package/app-backend/modules/SamlModule.js +0 -60
  148. package/app-backend/modules/SamlModule.js.map +0 -1
  149. package/app-backend/modules/SecretsModule.js +0 -137
  150. package/app-backend/modules/SecretsModule.js.map +0 -1
  151. package/app-backend/modules/_imports.js +0 -18
  152. package/app-frontend/core/module-pack.d.ts +0 -2
  153. package/app-frontend/core/module-pack.js +0 -23
  154. package/app-frontend/core/module-pack.js.map +0 -1
  155. package/app-frontend/modules/AccountModule.js +0 -164
  156. package/app-frontend/modules/AccountModule.js.map +0 -1
  157. package/app-frontend/ui/Component_Login.js +0 -68
  158. package/app-frontend/ui/Component_Login.js.map +0 -1
  159. package/app-frontend/ui/Component_Register.js +0 -74
  160. package/app-frontend/ui/Component_Register.js.map +0 -1
  161. package/backend.d.ts +0 -2
  162. package/backend.js +0 -19
  163. package/backend.js.map +0 -1
  164. package/frontend.d.ts +0 -3
  165. package/frontend.js +0 -20
  166. package/frontend.js.map +0 -1
  167. package/index.d.ts +0 -2
  168. package/index.js +0 -19
  169. package/index.js.map +0 -1
  170. package/shared/api.js +0 -16
  171. package/shared/api.js.map +0 -1
  172. package/shared/types.d.ts +0 -0
  173. package/shared/types.js +0 -2
  174. package/shared/utils/AuthenticationConsts.js +0 -6
  175. /package/{shared → dist/shared}/types.js.map +0 -0
@@ -1,137 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SecretsModule = exports.SecretsModule_Class = exports.TokenExpiredException = void 0;
4
- const ts_common_1 = require("@intuitionrobotics/ts-common");
5
- const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
6
- const jws = require("jws");
7
- const JWTBuilder_1 = require("./JWTBuilder");
8
- const __1 = require("../..");
9
- class TokenExpiredException extends backend_1.ApiException {
10
- constructor(message, cause) {
11
- super(401, message, cause);
12
- }
13
- }
14
- exports.TokenExpiredException = TokenExpiredException;
15
- class SecretsModule_Class extends ts_common_1.Module {
16
- constructor() {
17
- super("SecretsModule");
18
- this.DEFAULT_ISS = "TOOLS";
19
- this.AUTHENTICATION_PREFIX = __1.AUTHENTICATION_PREFIX;
20
- this.AUTHENTICATION_KEY = __1.AUTHENTICATION_KEY;
21
- this.getAuthSecret = (kid) => {
22
- return this.getSecret(kid);
23
- };
24
- this.getConfig = () => {
25
- if (!this.config)
26
- throw new ts_common_1.BadImplementationException(`Missing config, check SecretsModule's config`);
27
- if (!this.config.secrets)
28
- throw new ts_common_1.BadImplementationException(`Missing 'secrets' key in config, check SecretsModule's config`);
29
- return this.config.secrets;
30
- };
31
- this.isExpired = (token) => {
32
- return this.getExpiration(token) < (0, ts_common_1.currentTimeMillies)();
33
- };
34
- this.generateJwt = (payload, kid, algorithm = "HS256") => {
35
- const secret = this.getAuthSecret(kid);
36
- return new JWTBuilder_1.JWTBuilder(algorithm)
37
- // This is a default that can be overwritten by the claims
38
- .setExpiration(Math.floor(((0, ts_common_1.currentTimeMillies)() + ts_common_1.Day) / 1000))
39
- .addClaims(payload)
40
- .setIssuer(this.getIss())
41
- .setKeyID(secret.kid)
42
- .build(secret.value);
43
- };
44
- this.getIss = () => {
45
- const issuer = this.config.issuer;
46
- if (!issuer)
47
- return this.DEFAULT_ISS;
48
- return issuer;
49
- };
50
- this.decodeJwt = (jwt) => {
51
- return jws.decode(jwt);
52
- };
53
- this.setDefaultConfig({ validateKeyId: "AUTH_SECRET" });
54
- }
55
- getSecret(k) {
56
- var _a, _b;
57
- const secret = ((_a = process.env) === null || _a === void 0 ? void 0 : _a[k]) || ((_b = this.getConfig()) === null || _b === void 0 ? void 0 : _b[k]);
58
- if (!secret)
59
- throw new ts_common_1.BadImplementationException(`Missing secret with key ${k} in SecretsModule`);
60
- return {
61
- kid: k,
62
- value: secret
63
- };
64
- }
65
- validateRequestAndCheckExpiration(request, scopes) {
66
- const token = this.validateRequest(request, scopes);
67
- if (this.isExpired(token)) {
68
- const cause = `The JWT passed is not valid, check. With payload: ${(0, ts_common_1.__stringify)(token.payload)}. The JWT passed is expired`;
69
- throw new TokenExpiredException(cause);
70
- }
71
- return token.payload;
72
- }
73
- // Specify a kid to force the usage of it
74
- validateRequest(request, scopes) {
75
- var _a, _b;
76
- const authToken = this.extractAuthToken(request);
77
- const token = this.decodeJwt(authToken);
78
- if (!token)
79
- throw new backend_1.ApiException(401, "Could not decode token " + authToken);
80
- const kid = token.header.kid || this.config.validateKeyId;
81
- if (!kid)
82
- throw new backend_1.ApiException(401, "Could not deduce which key to use in order to verify the token, please specify a key ID");
83
- const secret = this.getAuthSecret(kid);
84
- const verified = jws.verify(authToken, token.header.alg, secret.value);
85
- let cause = `The JWT passed is not valid, check. With payload: ${(0, ts_common_1.__stringify)(token.payload)} and header ${(0, ts_common_1.__stringify)(token.header)}.`;
86
- if (!verified)
87
- throw new backend_1.ApiException(401, cause);
88
- if (!((_a = token.payload) === null || _a === void 0 ? void 0 : _a[JWTBuilder_1.EXPIRES_AT])) {
89
- cause += ` The JWT is missing the expiration claim`;
90
- throw new backend_1.ApiException(401, cause);
91
- }
92
- const scopesToValidate = (_b = token.payload) === null || _b === void 0 ? void 0 : _b.scopes;
93
- if (scopesToValidate)
94
- this.validateScopes(scopesToValidate, scopes);
95
- return token;
96
- }
97
- validateScopes(_scopesToValidate, scopes) {
98
- const scopesToValidate = _scopesToValidate.split(",");
99
- const isValidScope = scopesToValidate.some(s => scopes.includes(s));
100
- if (!isValidScope)
101
- throw new backend_1.ApiException(403, `User doesn't have valid scopes. It needs ${scopes.join(",")} but it has ${_scopesToValidate}`);
102
- }
103
- extractAuthToken(request) {
104
- const authHead = request.header(this.AUTHENTICATION_KEY);
105
- if (authHead === undefined)
106
- throw new ts_common_1.BadImplementationException("Missing Authorization header");
107
- if (!authHead)
108
- throw new ts_common_1.BadImplementationException('The Authorization header is empty');
109
- const parts = authHead.split(" ");
110
- if (parts.length !== 2 || parts[0] !== this.AUTHENTICATION_PREFIX)
111
- throw new ts_common_1.BadImplementationException(`The Authorization header is malformed` + "\n"
112
- + `Value: ${authHead}` + "\n"
113
- + `Expected Value: ${this.AUTHENTICATION_PREFIX} [token]`);
114
- const authToken = parts[1].trim();
115
- if (!authToken)
116
- throw new ts_common_1.BadImplementationException(`The token provided is empty`);
117
- return authToken;
118
- }
119
- getExpiration(token) {
120
- let exp = token.payload[JWTBuilder_1.EXPIRES_AT];
121
- if (!exp)
122
- return exp;
123
- const now = (0, ts_common_1.currentTimeMillies)();
124
- const cutOff = 100000000000; // 3-3-1973 in milliseconds
125
- const isInSeconds = exp < cutOff;
126
- if (isInSeconds)
127
- exp = exp * 1000;
128
- const year = 365 * ts_common_1.Day;
129
- if (exp > now + year)
130
- throw new backend_1.ApiException(401, `The JWT passed is not valid. Payload: ${(0, ts_common_1.__stringify)(token.payload)}.` +
131
- `Malformed JWT, expiry date is not valid, check the exp format, assumed to be in ${isInSeconds ? "seconds" : "milliseconds"}`);
132
- return exp;
133
- }
134
- }
135
- exports.SecretsModule_Class = SecretsModule_Class;
136
- exports.SecretsModule = new SecretsModule_Class();
137
- //# sourceMappingURL=SecretsModule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SecretsModule.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/SecretsModule.ts"],"names":[],"mappings":";;;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AI,CAAC,SAAS;YACV,MAAM,IAAI,sCAA0B,CAAC,6BAA6B,CAAC,CAAC;QAExE,OAAO,SAAS,CAAC;IACrB,CAAC;IAMM,aAAa,CAAC,KAAgB;QACjC,IAAI,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,uBAAU,CAAC,CAAC;QACpC,IAAI,CAAC,GAAG;YACJ,OAAO,GAAG,CAAC;QAEf,MAAM,GAAG,GAAG,IAAA,8BAAkB,GAAE,CAAC;QACjC,MAAM,MAAM,GAAG,YAAY,CAAC,CAAA,2BAA2B;QACvD,MAAM,WAAW,GAAG,GAAG,GAAG,MAAM,CAAC;QACjC,IAAI,WAAW;YACX,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;QAErB,MAAM,IAAI,GAAG,GAAG,GAAG,eAAG,CAAC;QACvB,IAAI,GAAG,GAAG,GAAG,GAAG,IAAI;YAChB,MAAM,IAAI,sBAAY,CAAC,GAAG,EAAE,yCAAyC,IAAA,uBAAW,EAAC,KAAK,CAAC,OAAO,CAAC,GAAG;gBAC9F,mFAAmF,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC;QACvI,OAAO,GAAG,CAAC;IACf,CAAC;CAuBJ;AAvJD,kDAuJC;AAEY,QAAA,aAAa,GAAG,IAAI,mBAAmB,EAAE,CAAA"}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("../../index"), exports);
18
- //# sourceMappingURL=_imports.js.map
@@ -1,2 +0,0 @@
1
- export declare const Frontend_ModulePack_Users: import("../modules/AccountModule").AccountModule_Class[];
2
- export * from "../modules/AccountModule";
@@ -1,23 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.Frontend_ModulePack_Users = void 0;
18
- const AccountModule_1 = require("../modules/AccountModule");
19
- exports.Frontend_ModulePack_Users = [
20
- AccountModule_1.AccountModule,
21
- ];
22
- __exportStar(require("../modules/AccountModule"), exports);
23
- //# sourceMappingURL=module-pack.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/module-pack.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,4DAAuD;AAE1C,QAAA,yBAAyB,GAAG;IACxC,6BAAa;CACb,CAAC;AAEF,2DAAwC"}
@@ -1,164 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.AccountModule = exports.AccountModule_Class = exports.LoggedStatus = exports.RequestKey_ValidateSession = exports.RequestKey_AccountLoginSAML = exports.RequestKey_AccountLogin = exports.RequestKey_AccountCreate = exports.StorageKey_JWT = exports.StorageKey_UserEmail = void 0;
13
- const ts_common_1 = require("@intuitionrobotics/ts-common");
14
- const frontend_1 = require("@intuitionrobotics/thunderstorm/frontend");
15
- const api_1 = require("../../shared/api");
16
- const thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
17
- const __1 = require("../..");
18
- exports.StorageKey_UserEmail = new frontend_1.StorageKey(`storage-${api_1.QueryParam_Email}`);
19
- exports.StorageKey_JWT = new frontend_1.StorageKey(`storage-${api_1.QueryParam_JWT}`);
20
- exports.RequestKey_AccountCreate = "account-create";
21
- exports.RequestKey_AccountLogin = "account-login";
22
- exports.RequestKey_AccountLoginSAML = "account-login-saml";
23
- exports.RequestKey_ValidateSession = "account-validate";
24
- var LoggedStatus;
25
- (function (LoggedStatus) {
26
- LoggedStatus[LoggedStatus["VALIDATING"] = 0] = "VALIDATING";
27
- LoggedStatus[LoggedStatus["LOGGED_OUT"] = 1] = "LOGGED_OUT";
28
- LoggedStatus[LoggedStatus["LOGGED_IN"] = 2] = "LOGGED_IN";
29
- })(LoggedStatus || (exports.LoggedStatus = LoggedStatus = {}));
30
- const dispatch_onAccountsLoaded = new frontend_1.ThunderDispatcher("__onAccountsLoaded");
31
- class AccountModule_Class extends ts_common_1.Module {
32
- constructor() {
33
- super("AccountModule");
34
- this.status = LoggedStatus.VALIDATING;
35
- this.accounts = [];
36
- this.onUnauthenticatedResponse = () => {
37
- this.logout();
38
- };
39
- this.getLoggedStatus = () => this.status;
40
- this.isStatus = (status) => this.status === status;
41
- this.setLoggedStatus = (newStatus) => {
42
- if (this.status === newStatus)
43
- return;
44
- const pervStatus = this.status;
45
- this.status = newStatus;
46
- this.logInfo(`Login status changes: ${LoggedStatus[pervStatus]} => ${LoggedStatus[newStatus]}`);
47
- this.dispatchUI_loginChanged.dispatchUI();
48
- this.dispatchUI_loginChanged.dispatchModule();
49
- };
50
- this.validateToken = () => {
51
- frontend_1.XhrHttpModule
52
- .createRequest(thunderstorm_1.HttpMethod.GET, exports.RequestKey_ValidateSession)
53
- .setLabel(`Validate token...`)
54
- .setRelativeUrl("/v1/account/validate")
55
- .setOnError((request, resError) => {
56
- if (request.getStatus() === 0) {
57
- frontend_1.ToastModule.toastError("Cannot reach Server... trying in 30 sec");
58
- setTimeout(() => exports.AccountModule.validateToken(), 30 * ts_common_1.Second);
59
- return;
60
- }
61
- exports.StorageKey_JWT.delete();
62
- return exports.AccountModule.setLoggedStatus(LoggedStatus.LOGGED_OUT);
63
- })
64
- .execute(() => __awaiter(this, void 0, void 0, function* () {
65
- exports.AccountModule.setLoggedStatus(LoggedStatus.LOGGED_IN);
66
- }));
67
- };
68
- this.logout = (url) => {
69
- exports.StorageKey_JWT.delete();
70
- if (url)
71
- return window.location.href = url;
72
- this.setLoggedStatus(LoggedStatus.LOGGED_OUT);
73
- };
74
- this.listUsers = () => {
75
- frontend_1.XhrHttpModule
76
- .createRequest(thunderstorm_1.HttpMethod.GET, exports.RequestKey_ValidateSession)
77
- .setLabel(`Fetching users...`)
78
- .setRelativeUrl("/v1/account/query")
79
- .execute((res) => __awaiter(this, void 0, void 0, function* () {
80
- this.accounts = res.accounts.filter(account => account._id);
81
- dispatch_onAccountsLoaded.dispatchUI();
82
- }));
83
- };
84
- frontend_1.XhrHttpModule.addDefaultResponseHandler((request) => {
85
- var _a;
86
- const status = request.getStatus();
87
- if (status < 200 || status >= 300)
88
- return false;
89
- try {
90
- const functionExecutionId = (_a = request === null || request === void 0 ? void 0 : request.getResponseHeader) === null || _a === void 0 ? void 0 : _a.call(request, thunderstorm_1.HeaderKey_FunctionExecutionId);
91
- frontend_1.XhrHttpModule.logDebug(`${request.key} Function execution id: ${functionExecutionId}`);
92
- const jwt = request.getResponseHeader(thunderstorm_1.HeaderKey_JWT);
93
- if (jwt)
94
- exports.StorageKey_JWT.set(jwt);
95
- }
96
- catch (e) {
97
- frontend_1.XhrHttpModule.logError(`${request.key} - Failed to retrieve headers from xhr call`, e);
98
- }
99
- return false;
100
- });
101
- }
102
- getAccounts() {
103
- return this.accounts;
104
- }
105
- init() {
106
- frontend_1.XhrHttpModule.addDefaultHeader(__1.AUTHENTICATION_KEY, () => `${__1.AUTHENTICATION_PREFIX} ${exports.StorageKey_JWT.get()}`);
107
- this.dispatchUI_loginChanged = new frontend_1.ThunderDispatcher("onLoginStatusUpdated");
108
- const email = frontend_1.BaseComponent.getQueryParameter(api_1.QueryParam_Email);
109
- const jwt = frontend_1.BaseComponent.getQueryParameter(api_1.QueryParam_JWT);
110
- if (email && jwt) {
111
- exports.StorageKey_JWT.set(jwt);
112
- exports.StorageKey_UserEmail.set(email);
113
- frontend_1.BrowserHistoryModule.removeQueryParam(api_1.QueryParam_Email);
114
- frontend_1.BrowserHistoryModule.removeQueryParam(api_1.QueryParam_JWT);
115
- }
116
- if (exports.StorageKey_JWT.get())
117
- return exports.AccountModule.validateToken();
118
- this.logDebug("login out user.... ");
119
- this.setLoggedStatus(LoggedStatus.LOGGED_OUT);
120
- }
121
- create(request) {
122
- frontend_1.XhrHttpModule
123
- .createRequest(thunderstorm_1.HttpMethod.POST, exports.RequestKey_AccountCreate)
124
- .setRelativeUrl("/v1/account/create")
125
- .setJsonBody(request)
126
- .setLabel(`User register...`)
127
- .setOnError("Error registering user")
128
- .execute((response) => __awaiter(this, void 0, void 0, function* () {
129
- frontend_1.ToastModule.toastSuccess(`Account successfully created with email: ${response.email}`);
130
- }));
131
- }
132
- login(request) {
133
- frontend_1.XhrHttpModule
134
- .createRequest(thunderstorm_1.HttpMethod.POST, exports.RequestKey_AccountLogin)
135
- .setRelativeUrl("/v1/account/login")
136
- .setJsonBody(request)
137
- .setLabel(`User login with password...`)
138
- .setOnError("Error login user")
139
- .execute((response) => __awaiter(this, void 0, void 0, function* () {
140
- this.setLoginInfo(response);
141
- }));
142
- }
143
- setLoginInfo(response) {
144
- exports.StorageKey_JWT.set(response.jwt);
145
- exports.StorageKey_UserEmail.set(response.email);
146
- this.setLoggedStatus(LoggedStatus.LOGGED_IN);
147
- }
148
- loginSAML(request) {
149
- frontend_1.XhrHttpModule
150
- .createRequest(thunderstorm_1.HttpMethod.GET, exports.RequestKey_AccountLoginSAML)
151
- .setRelativeUrl("/v1/account/login-saml")
152
- .setUrlParams(request)
153
- .setLabel(`User login SAML...`)
154
- .setOnError('Error login user')
155
- .execute((response) => __awaiter(this, void 0, void 0, function* () {
156
- if (!response.loginUrl)
157
- return;
158
- window.location.href = response.loginUrl;
159
- }));
160
- }
161
- }
162
- exports.AccountModule_Class = AccountModule_Class;
163
- exports.AccountModule = new AccountModule_Class();
164
- //# sourceMappingURL=AccountModule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AccountModule.js","sourceRoot":"","sources":["../../../src/main/app-frontend/modules/AccountModule.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,4DAA4D;AAC5D,uEAQkD;AAClD,0CAe0B;AAC1B,kEAKyC;AACzC,6BAAgE;AAEnD,QAAA,oBAAoB,GAAuB,IAAI,qBAAU,CAAS,WAAW,sBAAgB,EAAE,CAAC,CAAC;AACjG,QAAA,cAAc,GAAuB,IAAI,qBAAU,CAAS,WAAW,oBAAc,EAAE,CAAC,CAAC;AAEzF,QAAA,wBAAwB,GAAG,gBAAgB,CAAC;AAC5C,QAAA,uBAAuB,GAAG,eAAe,CAAC;AAC1C,QAAA,2BAA2B,GAAG,oBAAoB,CAAC;AACnD,QAAA,0BAA0B,GAAG,kBA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ChC,4BAAoB,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACzC,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IACjD,CAAC;IAEM,SAAS,CAAC,OAAgC;QAC7C,wBAAa;aACR,aAAa,CAAuB,yBAAU,CAAC,GAAG,EAAE,mCAA2B,CAAC;aAChF,cAAc,CAAC,wBAAwB,CAAC;aACxC,YAAY,CAAC,OAAO,CAAC;aACrB,QAAQ,CAAC,oBAAoB,CAAC;aAC9B,UAAU,CAAC,kBAAkB,CAAC;aAC9B,OAAO,CAAC,CAAO,QAA4B,EAAE,EAAE;YAC5C,IAAI,CAAC,QAAQ,CAAC,QAAQ;gBAClB,OAAO;YAEX,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC;QAC7C,CAAC,CAAA,CAAC,CAAC;IACX,CAAC;CAyCJ;AA9JD,kDA8JC;AAEY,QAAA,aAAa,GAAG,IAAI,mBAAmB,EAAE,CAAC"}
@@ -1,68 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Component_Login = void 0;
4
- const React = require("react");
5
- const ts_common_1 = require("@intuitionrobotics/ts-common");
6
- const AccountModule_1 = require("../modules/AccountModule");
7
- const frontend_1 = require("@intuitionrobotics/thunderstorm/frontend");
8
- const style = {
9
- "height": "38px",
10
- "borderRadius": "25px",
11
- "backgroundColor": "#9c9ccd",
12
- "borderWidth": "0",
13
- "textAlign": "left",
14
- "padding": "0 15px",
15
- "color": "white",
16
- "marginTop": "10px"
17
- };
18
- const form = {
19
- email: {
20
- type: "text",
21
- hint: "email",
22
- label: "Email",
23
- },
24
- password: {
25
- type: "password",
26
- hint: "****",
27
- label: "Password",
28
- }
29
- };
30
- class Component_Login extends React.Component {
31
- constructor() {
32
- super(...arguments);
33
- this.state = {
34
- data: {},
35
- };
36
- this.onValueChanged = (value, id) => {
37
- this.setState(state => {
38
- state.data[id] = value;
39
- return state;
40
- });
41
- };
42
- this.loginClicked = () => {
43
- const data = this.state.data;
44
- const errors = (0, ts_common_1._keys)(form).map(key => {
45
- const field = form[key];
46
- return data[key] ? undefined : ` * missing ${field.label}`;
47
- }).filter(error => !!error);
48
- const validateError = this.props.validate && this.props.validate(data);
49
- if (validateError)
50
- (0, ts_common_1.addItemToArray)(errors, validateError);
51
- if (errors.length > 0)
52
- return frontend_1.ToastModule.toastError(`Wrong input:\n${errors.join("\n")}`);
53
- AccountModule_1.AccountModule.login(this.state.data);
54
- };
55
- }
56
- render() {
57
- const data = this.state.data;
58
- return React.createElement(React.Fragment, null,
59
- React.createElement("div", { className: 'll_v_c', style: { justifyContent: 'space-evenly' } }, (0, ts_common_1._keys)(form).map(key => {
60
- const field = form[key];
61
- return React.createElement(frontend_1.TS_Input, { id: key, key: key, value: data[key], type: field.type, placeholder: field.hint, onChange: this.onValueChanged, onAccept: this.loginClicked });
62
- })),
63
- React.createElement("div", { className: 'll_h_c', style: { justifyContent: 'center' } },
64
- React.createElement("button", { onClick: this.loginClicked, className: `clickable`, style: style }, "Login")));
65
- }
66
- }
67
- exports.Component_Login = Component_Login;
68
- //# sourceMappingURL=Component_Login.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Component_Login.js","sourceRoot":"","sources":["../../../src/main/app-frontend/ui/Component_Login.tsx"],"names":[],"mappings":";;;AACA,+BAA+B;AAE/B,4DAGsC;AACtC,4DAAuD;AAEvD,uEAGkD;AAelD,MAAM,KAAK,GAAkB;IAC5B,QAAQ,EAAE,MAAM;IAChB,cAAc,EAAE,MAAM;IACtB,iBAAiB,EAAE,SAAS;IAC5B,aAAa,EAAE,GAAG;IAClB,WAAW,EAAE,MAAM;IACnB,SAAS,EAAE,QAAQ;IACnB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,MAAM;CACnB,CAAC;AAUF,MAAM,IAAI,GAAkD;IAC3D,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;QACZ,I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AC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAErE,6BAAa,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAA4B,CAAC,CAAC;QAC9D,CAAC,CAAC;IACH,CAAC;IAhDA,MAAM;QACL,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QAC7B,OAAO;YACN,6BAAK,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAC,cAAc,EAAE,cAAc,EAAC,IAC/D,IAAA,iBAAK,EAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBACL,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;gBACxB,OAAO,oBAAC,mBAAQ,IACf,EAAE,EAAE,GAAG,EACP,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,EAChB,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,WAAW,EAAE,KAAK,CAAC,IAAI,EACvB,QAAQ,EAAE,IAAI,CAAC,cAAc,EAC7B,QAAQ,EAAE,IAAI,CAAC,YAAY,GAC1B,CAAC;YACJ,CAAC,CACjB,CACI;YACN,6BAAK,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAC,cAAc,EAAE,QAAQ,EAAC;gBAC1D,gCAAQ,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,YAC/D,CACJ,CACJ,CAAC;IACL,CAAC;CAyBD;AAvDD,0CAuDC"}
@@ -1,74 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Component_Register = void 0;
4
- const React = require("react");
5
- const ts_common_1 = require("@intuitionrobotics/ts-common");
6
- const AccountModule_1 = require("../modules/AccountModule");
7
- const frontend_1 = require("@intuitionrobotics/thunderstorm/frontend");
8
- const style = {
9
- "height": "38px",
10
- "borderRadius": "25px",
11
- "backgroundColor": "#9c9ccd",
12
- "borderWidth": "0",
13
- "textAlign": "left",
14
- "padding": "0 15px",
15
- "color": "white",
16
- "marginTop": "10px"
17
- };
18
- const form = {
19
- email: {
20
- className: "",
21
- type: "text",
22
- hint: "email",
23
- label: "Email",
24
- },
25
- password: {
26
- type: "password",
27
- hint: "****",
28
- label: "Password",
29
- },
30
- password_check: {
31
- type: "password",
32
- hint: "****",
33
- label: "Password Check",
34
- },
35
- };
36
- class Component_Register extends React.Component {
37
- constructor() {
38
- super(...arguments);
39
- this.state = {
40
- data: {},
41
- };
42
- this.onValueChanged = (value, id) => {
43
- this.setState(state => {
44
- state.data[id] = value;
45
- return state;
46
- });
47
- };
48
- this.registerClicked = () => {
49
- const data = this.state.data;
50
- const errors = (0, ts_common_1._keys)(form).map(key => {
51
- const field = form[key];
52
- return data[key] ? undefined : ` * missing ${field.label}`;
53
- }).filter(error => !!error);
54
- const validateError = this.props.validate && this.props.validate(data);
55
- if (validateError)
56
- (0, ts_common_1.addItemToArray)(errors, validateError);
57
- if (errors.length > 0)
58
- return frontend_1.ToastModule.toastError(`Wrong input:\n${errors.join("\n")}`);
59
- AccountModule_1.AccountModule.create(this.state.data);
60
- };
61
- }
62
- render() {
63
- const data = this.state.data;
64
- return React.createElement(React.Fragment, null,
65
- React.createElement("div", { className: 'll_v_c', style: { justifyContent: 'space-evenly' } }, (0, ts_common_1._keys)(form).map(key => {
66
- const field = form[key];
67
- return React.createElement(frontend_1.TS_Input, { id: key, value: data[key], type: field.type, placeholder: field === null || field === void 0 ? void 0 : field.hint, onChange: this.onValueChanged, onAccept: this.registerClicked });
68
- })),
69
- React.createElement("div", { className: 'll_h_c', style: { justifyContent: 'center' } },
70
- React.createElement("button", { onClick: this.registerClicked, className: `clickable`, style: style }, "Register")));
71
- }
72
- }
73
- exports.Component_Register = Component_Register;
74
- //# sourceMappingURL=Component_Register.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Component_Register.js","sourceRoot":"","sources":["../../../src/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CAAC,eAAe,GAC7B,CAAA;YACH,CAAC,CACjB,CACI;YACN,6BAAK,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAC,cAAc,EAAE,QAAQ,EAAC;gBAC1D,gCAAQ,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,eAClE,CACJ,CACJ,CAAC;IACL,CAAC;CAyBD;AAtDD,gDAsDC"}
package/backend.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./app-backend/core/module-pack";
2
- export * from "./app-backend/apis/add-new-account";
package/backend.js DELETED
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./app-backend/core/module-pack"), exports);
18
- __exportStar(require("./app-backend/apis/add-new-account"), exports);
19
- //# sourceMappingURL=backend.js.map
package/backend.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"backend.js","sourceRoot":"","sources":["../src/main/backend.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,iEAA+C;AAC/C,qEAAmD"}
package/frontend.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from "./app-frontend/core/module-pack";
2
- export * from "./app-frontend/ui/Component_Login";
3
- export * from "./app-frontend/ui/Component_Register";
package/frontend.js DELETED
@@ -1,20 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./app-frontend/core/module-pack"), exports);
18
- __exportStar(require("./app-frontend/ui/Component_Login"), exports);
19
- __exportStar(require("./app-frontend/ui/Component_Register"), exports);
20
- //# sourceMappingURL=frontend.js.map
package/frontend.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"frontend.js","sourceRoot":"","sources":["../src/main/frontend.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,kEAAgD;AAChD,oEAAkD;AAClD,uEAAqD"}
package/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./shared/api";
2
- export * from "./shared/utils/AuthenticationConsts";
package/index.js DELETED
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./shared/api"), exports);
18
- __exportStar(require("./shared/utils/AuthenticationConsts"), exports);
19
- //# sourceMappingURL=index.js.map
package/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/main/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,+CAA6B;AAC7B,sEAAoD"}
package/shared/api.js DELETED
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FrontType = exports.HeaderKey_CurrentPage = exports.QueryParam_RedirectUrl = exports.QueryParam_SessionId = exports.QueryParam_JWT = exports.QueryParam_Email = exports.HeaderKey_Email = exports.HeaderKey_SessionId = void 0;
4
- exports.HeaderKey_SessionId = "x-session-id";
5
- exports.HeaderKey_Email = "x-email";
6
- exports.QueryParam_Email = "userEmail";
7
- exports.QueryParam_JWT = "jwt";
8
- exports.QueryParam_SessionId = exports.HeaderKey_SessionId;
9
- exports.QueryParam_RedirectUrl = "redirectUrl";
10
- exports.HeaderKey_CurrentPage = "current-page";
11
- var FrontType;
12
- (function (FrontType) {
13
- FrontType["Web"] = "web";
14
- FrontType["App"] = "app";
15
- })(FrontType || (exports.FrontType = FrontType = {}));
16
- //# sourceMappingURL=api.js.map
package/shared/api.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/main/shared/api.ts"],"names":[],"mappings":";;;AAGa,QAAA,mBAAmB,GAAG,cAAc,CAAC;AACrC,QAAA,eAAe,GAAG,SAAS,CAAC;AAE5B,QAAA,gBAAgB,GAAG,WAAW,CAAC;AAC/B,QAAA,cAAc,GAAG,KAAK,CAAC;AACvB,QAAA,oBAAoB,GAAG,2BAAmB,CAAC;AAC3C,QAAA,sBAAsB,GAAG,aAAa,CAAC;AACvC,QAAA,qBAAqB,GAAG,cAAc,CAAC;AAEpD,IAAY,SAGX;AAHD,WAAY,SAAS;IACjB,wBAAW,CAAA;IACX,wBAAW,CAAA;AACf,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB"}