@pax2pay/client 0.3.85 → 0.3.86
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/Client/Auth/index.ts
CHANGED
|
@@ -5,10 +5,14 @@ import { Connection } from "../Connection"
|
|
|
5
5
|
export class Auth {
|
|
6
6
|
#roles?: string[]
|
|
7
7
|
#features?: PaxpayFeature[]
|
|
8
|
+
#data: Partial<model.LoginResponse>
|
|
8
9
|
constructor(private connection: Connection) {}
|
|
9
10
|
static create(connection: Connection) {
|
|
10
11
|
return new Auth(connection)
|
|
11
12
|
}
|
|
13
|
+
get roles(): string[] | undefined {
|
|
14
|
+
return (this.#roles ??= window.sessionStorage.getItem("roles")?.split(","))
|
|
15
|
+
}
|
|
12
16
|
set roles(roles: string[] | undefined) {
|
|
13
17
|
this.#roles = roles
|
|
14
18
|
if (roles)
|
|
@@ -16,18 +20,11 @@ export class Auth {
|
|
|
16
20
|
else
|
|
17
21
|
window.sessionStorage.removeItem("roles")
|
|
18
22
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return
|
|
22
|
-
const roles = window.sessionStorage.getItem("roles")
|
|
23
|
-
this.#roles = roles ? roles.split(",") : []
|
|
24
|
-
}
|
|
25
|
-
data(): Partial<model.LoginResponse> {
|
|
26
|
-
return JSON.parse(window.sessionStorage.getItem("authData") ?? "{}")
|
|
23
|
+
hasRole(role: string): boolean {
|
|
24
|
+
return this.roles?.includes(role) ?? false
|
|
27
25
|
}
|
|
28
|
-
|
|
29
|
-
this.
|
|
30
|
-
return this.#roles ? this.#roles.includes(role) : false
|
|
26
|
+
get features(): PaxpayFeature[] | undefined {
|
|
27
|
+
return (this.#features ??= window.sessionStorage.getItem("features")?.split(",") as PaxpayFeature[])
|
|
31
28
|
}
|
|
32
29
|
set features(features: PaxpayFeature[] | undefined) {
|
|
33
30
|
this.#features = features
|
|
@@ -36,21 +33,18 @@ export class Auth {
|
|
|
36
33
|
else
|
|
37
34
|
window.sessionStorage.removeItem("features")
|
|
38
35
|
}
|
|
39
|
-
private loadFeatures() {
|
|
40
|
-
if (this.#features)
|
|
41
|
-
return
|
|
42
|
-
const features = window.sessionStorage.getItem("features")
|
|
43
|
-
this.#features = features ? (features.split(",") as PaxpayFeature[]) : []
|
|
44
|
-
}
|
|
45
36
|
hasFeature(feature: PaxpayFeature) {
|
|
46
|
-
this.
|
|
47
|
-
return this.#features ? this.#features.includes(feature) : false
|
|
37
|
+
return this.features?.includes(feature) ?? false
|
|
48
38
|
}
|
|
49
|
-
|
|
50
|
-
return this.
|
|
39
|
+
get data(): Partial<model.LoginResponse> {
|
|
40
|
+
return (this.#data ??= JSON.parse(window.sessionStorage.getItem("authData") ?? "{}"))
|
|
51
41
|
}
|
|
52
|
-
|
|
53
|
-
|
|
42
|
+
set data(value: Partial<model.LoginResponse> | undefined) {
|
|
43
|
+
this.#data = value ?? {}
|
|
44
|
+
if (value)
|
|
45
|
+
window.sessionStorage.setItem("authData", JSON.stringify(value))
|
|
46
|
+
else
|
|
47
|
+
window.sessionStorage.removeItem("authData")
|
|
54
48
|
}
|
|
55
49
|
get token(): string | undefined {
|
|
56
50
|
return this.connection.token
|
|
@@ -59,12 +53,11 @@ export class Auth {
|
|
|
59
53
|
this.connection.token = value
|
|
60
54
|
}
|
|
61
55
|
setTempToken(value: string) {
|
|
62
|
-
|
|
56
|
+
this.data = { token: value }
|
|
63
57
|
this.connection.token = value
|
|
64
58
|
}
|
|
65
59
|
isLoggedIn(): boolean {
|
|
66
|
-
|
|
67
|
-
return data ? JSON.parse(data)?.status == "SUCCESS" : false
|
|
60
|
+
return this.data.status == "SUCCESS" ?? false
|
|
68
61
|
}
|
|
69
62
|
async login(request: model.LoginRequest, otp?: string) {
|
|
70
63
|
const result = await this.connection.post<model.LoginResponse, 400 | 403 | 404 | 500>(
|
|
@@ -75,7 +68,7 @@ export class Auth {
|
|
|
75
68
|
)
|
|
76
69
|
if (!isError(result) && result.token) {
|
|
77
70
|
this.connection.token = result.token
|
|
78
|
-
|
|
71
|
+
this.data = result
|
|
79
72
|
}
|
|
80
73
|
return result
|
|
81
74
|
}
|
|
@@ -88,13 +81,12 @@ export class Auth {
|
|
|
88
81
|
}
|
|
89
82
|
if (!isError(result)) {
|
|
90
83
|
this.connection.token = result.token
|
|
91
|
-
|
|
84
|
+
this.data = result
|
|
92
85
|
}
|
|
93
86
|
return result
|
|
94
87
|
}
|
|
95
88
|
isAssumed(): boolean {
|
|
96
|
-
|
|
97
|
-
return data.user?.organisation?.code != data.organisation
|
|
89
|
+
return this.data.user?.organisation?.code != this.data.organisation
|
|
98
90
|
}
|
|
99
91
|
async assume(
|
|
100
92
|
code: string
|
|
@@ -102,21 +94,20 @@ export class Auth {
|
|
|
102
94
|
const result = await this.connection.get<model.LoginResponse, 400 | 403 | 404 | 500>(`auth/assume/org/${code}`)
|
|
103
95
|
if (!isError(result)) {
|
|
104
96
|
this.connection.token = result.token
|
|
105
|
-
|
|
97
|
+
this.data = result
|
|
106
98
|
}
|
|
107
99
|
return result
|
|
108
100
|
}
|
|
109
101
|
async unassume(): Promise<
|
|
110
102
|
model.LoginResponse | (model.ErrorResponse & { status: 400 | 403 | 404 | 500 | 503 }) | undefined
|
|
111
103
|
> {
|
|
112
|
-
|
|
113
|
-
return data.user?.organisation?.code ? await this.assume(data?.user?.organisation?.code) : undefined
|
|
104
|
+
return this.data.user?.organisation?.code ? await this.assume(this.data.user.organisation.code) : undefined
|
|
114
105
|
}
|
|
115
106
|
|
|
116
107
|
async logout() {
|
|
117
108
|
this.roles = undefined
|
|
118
109
|
this.features = undefined
|
|
119
|
-
|
|
110
|
+
this.data = undefined
|
|
120
111
|
this.connection.token = undefined
|
|
121
112
|
}
|
|
122
113
|
}
|
|
@@ -6,15 +6,14 @@ export declare class Auth {
|
|
|
6
6
|
private connection;
|
|
7
7
|
constructor(connection: Connection);
|
|
8
8
|
static create(connection: Connection): Auth;
|
|
9
|
+
get roles(): string[] | undefined;
|
|
9
10
|
set roles(roles: string[] | undefined);
|
|
10
|
-
private loadRoles;
|
|
11
|
-
data(): Partial<model.LoginResponse>;
|
|
12
11
|
hasRole(role: string): boolean;
|
|
12
|
+
get features(): PaxpayFeature[] | undefined;
|
|
13
13
|
set features(features: PaxpayFeature[] | undefined);
|
|
14
|
-
private loadFeatures;
|
|
15
14
|
hasFeature(feature: PaxpayFeature): boolean;
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
get data(): Partial<model.LoginResponse>;
|
|
16
|
+
set data(value: Partial<model.LoginResponse> | undefined);
|
|
18
17
|
get token(): string | undefined;
|
|
19
18
|
set token(value: string | undefined);
|
|
20
19
|
setTempToken(value: string): void;
|
|
@@ -1,24 +1,29 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
1
6
|
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
7
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
8
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
9
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
10
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
11
|
};
|
|
7
|
-
var
|
|
8
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
-
};
|
|
12
|
-
var _Auth_roles, _Auth_features;
|
|
12
|
+
var _Auth_roles, _Auth_features, _Auth_data;
|
|
13
13
|
export class Auth {
|
|
14
14
|
constructor(connection) {
|
|
15
15
|
this.connection = connection;
|
|
16
16
|
_Auth_roles.set(this, void 0);
|
|
17
17
|
_Auth_features.set(this, void 0);
|
|
18
|
+
_Auth_data.set(this, void 0);
|
|
18
19
|
}
|
|
19
20
|
static create(connection) {
|
|
20
21
|
return new Auth(connection);
|
|
21
22
|
}
|
|
23
|
+
get roles() {
|
|
24
|
+
var _a, _b;
|
|
25
|
+
return (__classPrivateFieldSet(this, _Auth_roles, (_a = __classPrivateFieldGet(this, _Auth_roles, "f")) !== null && _a !== void 0 ? _a : (_b = window.sessionStorage.getItem("roles")) === null || _b === void 0 ? void 0 : _b.split(","), "f"));
|
|
26
|
+
}
|
|
22
27
|
set roles(roles) {
|
|
23
28
|
__classPrivateFieldSet(this, _Auth_roles, roles, "f");
|
|
24
29
|
if (roles)
|
|
@@ -26,19 +31,13 @@ export class Auth {
|
|
|
26
31
|
else
|
|
27
32
|
window.sessionStorage.removeItem("roles");
|
|
28
33
|
}
|
|
29
|
-
loadRoles() {
|
|
30
|
-
if (__classPrivateFieldGet(this, _Auth_roles, "f"))
|
|
31
|
-
return;
|
|
32
|
-
const roles = window.sessionStorage.getItem("roles");
|
|
33
|
-
__classPrivateFieldSet(this, _Auth_roles, roles ? roles.split(",") : [], "f");
|
|
34
|
-
}
|
|
35
|
-
data() {
|
|
36
|
-
var _a;
|
|
37
|
-
return JSON.parse((_a = window.sessionStorage.getItem("authData")) !== null && _a !== void 0 ? _a : "{}");
|
|
38
|
-
}
|
|
39
34
|
hasRole(role) {
|
|
40
|
-
|
|
41
|
-
return
|
|
35
|
+
var _a, _b;
|
|
36
|
+
return (_b = (_a = this.roles) === null || _a === void 0 ? void 0 : _a.includes(role)) !== null && _b !== void 0 ? _b : false;
|
|
37
|
+
}
|
|
38
|
+
get features() {
|
|
39
|
+
var _a, _b;
|
|
40
|
+
return (__classPrivateFieldSet(this, _Auth_features, (_a = __classPrivateFieldGet(this, _Auth_features, "f")) !== null && _a !== void 0 ? _a : (_b = window.sessionStorage.getItem("features")) === null || _b === void 0 ? void 0 : _b.split(","), "f"));
|
|
42
41
|
}
|
|
43
42
|
set features(features) {
|
|
44
43
|
__classPrivateFieldSet(this, _Auth_features, features, "f");
|
|
@@ -47,21 +46,20 @@ export class Auth {
|
|
|
47
46
|
else
|
|
48
47
|
window.sessionStorage.removeItem("features");
|
|
49
48
|
}
|
|
50
|
-
loadFeatures() {
|
|
51
|
-
if (__classPrivateFieldGet(this, _Auth_features, "f"))
|
|
52
|
-
return;
|
|
53
|
-
const features = window.sessionStorage.getItem("features");
|
|
54
|
-
__classPrivateFieldSet(this, _Auth_features, features ? features.split(",") : [], "f");
|
|
55
|
-
}
|
|
56
49
|
hasFeature(feature) {
|
|
57
|
-
|
|
58
|
-
return
|
|
50
|
+
var _a, _b;
|
|
51
|
+
return (_b = (_a = this.features) === null || _a === void 0 ? void 0 : _a.includes(feature)) !== null && _b !== void 0 ? _b : false;
|
|
59
52
|
}
|
|
60
|
-
|
|
61
|
-
|
|
53
|
+
get data() {
|
|
54
|
+
var _a, _b;
|
|
55
|
+
return (__classPrivateFieldSet(this, _Auth_data, (_a = __classPrivateFieldGet(this, _Auth_data, "f")) !== null && _a !== void 0 ? _a : JSON.parse((_b = window.sessionStorage.getItem("authData")) !== null && _b !== void 0 ? _b : "{}"), "f"));
|
|
62
56
|
}
|
|
63
|
-
|
|
64
|
-
|
|
57
|
+
set data(value) {
|
|
58
|
+
__classPrivateFieldSet(this, _Auth_data, value !== null && value !== void 0 ? value : {}, "f");
|
|
59
|
+
if (value)
|
|
60
|
+
window.sessionStorage.setItem("authData", JSON.stringify(value));
|
|
61
|
+
else
|
|
62
|
+
window.sessionStorage.removeItem("authData");
|
|
65
63
|
}
|
|
66
64
|
get token() {
|
|
67
65
|
return this.connection.token;
|
|
@@ -70,19 +68,18 @@ export class Auth {
|
|
|
70
68
|
this.connection.token = value;
|
|
71
69
|
}
|
|
72
70
|
setTempToken(value) {
|
|
73
|
-
|
|
71
|
+
this.data = { token: value };
|
|
74
72
|
this.connection.token = value;
|
|
75
73
|
}
|
|
76
74
|
isLoggedIn() {
|
|
77
75
|
var _a;
|
|
78
|
-
|
|
79
|
-
return data ? ((_a = JSON.parse(data)) === null || _a === void 0 ? void 0 : _a.status) == "SUCCESS" : false;
|
|
76
|
+
return (_a = this.data.status == "SUCCESS") !== null && _a !== void 0 ? _a : false;
|
|
80
77
|
}
|
|
81
78
|
async login(request, otp) {
|
|
82
79
|
const result = await this.connection.post("auth/login", request, undefined, otp ? { "x-otp": otp } : {});
|
|
83
80
|
if (!isError(result) && result.token) {
|
|
84
81
|
this.connection.token = result.token;
|
|
85
|
-
|
|
82
|
+
this.data = result;
|
|
86
83
|
}
|
|
87
84
|
return result;
|
|
88
85
|
}
|
|
@@ -96,36 +93,34 @@ export class Auth {
|
|
|
96
93
|
}
|
|
97
94
|
if (!isError(result)) {
|
|
98
95
|
this.connection.token = result.token;
|
|
99
|
-
|
|
96
|
+
this.data = result;
|
|
100
97
|
}
|
|
101
98
|
return result;
|
|
102
99
|
}
|
|
103
100
|
isAssumed() {
|
|
104
101
|
var _a, _b;
|
|
105
|
-
|
|
106
|
-
return ((_b = (_a = data.user) === null || _a === void 0 ? void 0 : _a.organisation) === null || _b === void 0 ? void 0 : _b.code) != data.organisation;
|
|
102
|
+
return ((_b = (_a = this.data.user) === null || _a === void 0 ? void 0 : _a.organisation) === null || _b === void 0 ? void 0 : _b.code) != this.data.organisation;
|
|
107
103
|
}
|
|
108
104
|
async assume(code) {
|
|
109
105
|
const result = await this.connection.get(`auth/assume/org/${code}`);
|
|
110
106
|
if (!isError(result)) {
|
|
111
107
|
this.connection.token = result.token;
|
|
112
|
-
|
|
108
|
+
this.data = result;
|
|
113
109
|
}
|
|
114
110
|
return result;
|
|
115
111
|
}
|
|
116
112
|
async unassume() {
|
|
117
|
-
var _a, _b
|
|
118
|
-
|
|
119
|
-
return ((_b = (_a = data.user) === null || _a === void 0 ? void 0 : _a.organisation) === null || _b === void 0 ? void 0 : _b.code) ? await this.assume((_d = (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.organisation) === null || _d === void 0 ? void 0 : _d.code) : undefined;
|
|
113
|
+
var _a, _b;
|
|
114
|
+
return ((_b = (_a = this.data.user) === null || _a === void 0 ? void 0 : _a.organisation) === null || _b === void 0 ? void 0 : _b.code) ? await this.assume(this.data.user.organisation.code) : undefined;
|
|
120
115
|
}
|
|
121
116
|
async logout() {
|
|
122
117
|
this.roles = undefined;
|
|
123
118
|
this.features = undefined;
|
|
124
|
-
|
|
119
|
+
this.data = undefined;
|
|
125
120
|
this.connection.token = undefined;
|
|
126
121
|
}
|
|
127
122
|
}
|
|
128
|
-
_Auth_roles = new WeakMap(), _Auth_features = new WeakMap();
|
|
123
|
+
_Auth_roles = new WeakMap(), _Auth_features = new WeakMap(), _Auth_data = new WeakMap();
|
|
129
124
|
function isError(value) {
|
|
130
125
|
return typeof value == "object" && typeof value.code == "number";
|
|
131
126
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,MAAM,OAAO,IAAI;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,MAAM,OAAO,IAAI;IAIhB,YAAoB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;QAH1C,8BAAiB;QACjB,iCAA2B;QAC3B,6BAAmC;IACU,CAAC;IAC9C,MAAM,CAAC,MAAM,CAAC,UAAsB;QACnC,OAAO,IAAI,IAAI,CAAC,UAAU,CAAC,CAAA;IAC5B,CAAC;IACD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