@rolatech/angular-auth 17.2.16
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/README.md +7 -0
- package/esm2022/index.mjs +10 -0
- package/esm2022/lib/angular-auth.module.mjs +24 -0
- package/esm2022/lib/auth-routing.module.mjs +40 -0
- package/esm2022/lib/auth.routes.mjs +13 -0
- package/esm2022/lib/auth.store.mjs +51 -0
- package/esm2022/lib/components/auth-dialog/auth-dialog.component.mjs +14 -0
- package/esm2022/lib/components/faceid-detect-dialog/faceid-detect-dialog.component.mjs +88 -0
- package/esm2022/lib/components/forbidden/forbidden.component.mjs +11 -0
- package/esm2022/lib/components/index.mjs +2 -0
- package/esm2022/lib/components/unauthorized/unauthorized.component.mjs +11 -0
- package/esm2022/lib/guards/auth-dialog.guard.mjs +37 -0
- package/esm2022/lib/guards/auth.guard.mjs +40 -0
- package/esm2022/lib/guards/index.mjs +5 -0
- package/esm2022/lib/guards/permission.guard.mjs +16 -0
- package/esm2022/lib/guards/role.guard.mjs +32 -0
- package/esm2022/lib/interceptors/auth.interceptor.mjs +66 -0
- package/esm2022/lib/interceptors/cookie.interceptor.mjs +31 -0
- package/esm2022/lib/interceptors/error.interceptor.mjs +63 -0
- package/esm2022/lib/interceptors/index.mjs +3 -0
- package/esm2022/lib/interfaces/auth.interface.mjs +7 -0
- package/esm2022/lib/pages/forgot-password/forgot-password.component.mjs +13 -0
- package/esm2022/lib/pages/passwordreset/passwordreset.component.mjs +13 -0
- package/esm2022/lib/pages/signin/signin.component.mjs +67 -0
- package/esm2022/lib/pages/signup/signup.component.mjs +13 -0
- package/esm2022/lib/services/auth.service.mjs +139 -0
- package/esm2022/lib/services/auth.user.service.mjs +135 -0
- package/esm2022/lib/services/index.mjs +4 -0
- package/esm2022/lib/services/storage.service.mjs +50 -0
- package/esm2022/provider.mjs +25 -0
- package/esm2022/rolatech-angular-auth.mjs +5 -0
- package/fesm2022/rolatech-angular-auth.mjs +735 -0
- package/fesm2022/rolatech-angular-auth.mjs.map +1 -0
- package/index.d.ts +9 -0
- package/lib/angular-auth.module.d.ts +10 -0
- package/lib/auth-routing.module.d.ts +7 -0
- package/lib/auth.routes.d.ts +2 -0
- package/lib/auth.store.d.ts +16 -0
- package/lib/components/auth-dialog/auth-dialog.component.d.ts +7 -0
- package/lib/components/faceid-detect-dialog/faceid-detect-dialog.component.d.ts +23 -0
- package/lib/components/forbidden/forbidden.component.d.ts +5 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/unauthorized/unauthorized.component.d.ts +5 -0
- package/lib/guards/auth-dialog.guard.d.ts +2 -0
- package/lib/guards/auth.guard.d.ts +2 -0
- package/lib/guards/index.d.ts +4 -0
- package/lib/guards/permission.guard.d.ts +2 -0
- package/lib/guards/role.guard.d.ts +2 -0
- package/lib/interceptors/auth.interceptor.d.ts +15 -0
- package/lib/interceptors/cookie.interceptor.d.ts +9 -0
- package/lib/interceptors/error.interceptor.d.ts +23 -0
- package/lib/interceptors/index.d.ts +2 -0
- package/lib/interfaces/auth.interface.d.ts +29 -0
- package/lib/pages/forgot-password/forgot-password.component.d.ts +8 -0
- package/lib/pages/passwordreset/passwordreset.component.d.ts +8 -0
- package/lib/pages/signin/signin.component.d.ts +25 -0
- package/lib/pages/signup/signup.component.d.ts +8 -0
- package/lib/services/auth.service.d.ts +33 -0
- package/lib/services/auth.user.service.d.ts +36 -0
- package/lib/services/index.d.ts +3 -0
- package/lib/services/storage.service.d.ts +15 -0
- package/package.json +31 -0
- package/provider.d.ts +2 -0
- package/themes/_default.scss +1 -0
|
@@ -0,0 +1,735 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, signal, computed, Injectable, inject, PLATFORM_ID, makeEnvironmentProviders } from '@angular/core';
|
|
3
|
+
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule, MatDialog } from '@angular/material/dialog';
|
|
4
|
+
import { APP_CONFIG } from '@rolatech/angular-common';
|
|
5
|
+
import { SnackBarService } from '@rolatech/angular-services';
|
|
6
|
+
import QRCode from 'qrcode';
|
|
7
|
+
import * as i1 from '@angular/material/button';
|
|
8
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
9
|
+
import { HttpClient, HttpErrorResponse, HttpResponse, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
10
|
+
import { map, tap, filter, catchError as catchError$1 } from 'rxjs/operators';
|
|
11
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
12
|
+
import { SpinnerComponent } from '@rolatech/angular-components';
|
|
13
|
+
import { isPlatformBrowser, CommonModule } from '@angular/common';
|
|
14
|
+
import { of, map as map$1, BehaviorSubject, catchError, throwError, NEVER } from 'rxjs';
|
|
15
|
+
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
16
|
+
|
|
17
|
+
class ForbiddenComponent {
|
|
18
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: ForbiddenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0", type: ForbiddenComponent, isStandalone: true, selector: "rolatech-forbidden", ngImport: i0, template: "<div class=\"p-6 max-w-lg h-auto max-h-32\">\n <div class=\"flex flex-col\">\n <b>403.</b>\n <p>Forbidden page.</p>\n </div>\n</div>\n", styles: [""] });
|
|
20
|
+
}
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: ForbiddenComponent, decorators: [{
|
|
22
|
+
type: Component,
|
|
23
|
+
args: [{ selector: 'rolatech-forbidden', standalone: true, template: "<div class=\"p-6 max-w-lg h-auto max-h-32\">\n <div class=\"flex flex-col\">\n <b>403.</b>\n <p>Forbidden page.</p>\n </div>\n</div>\n" }]
|
|
24
|
+
}] });
|
|
25
|
+
|
|
26
|
+
class UnauthorizedComponent {
|
|
27
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: UnauthorizedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
28
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0", type: UnauthorizedComponent, isStandalone: true, selector: "rolatech-unauthorized", ngImport: i0, template: "<div class=\"p-6 max-w-lg h-auto max-h-32\">\n <div class=\"flex flex-col\">\n <b>401.</b>\n <p>Unauthorized page.</p>\n </div>\n</div>\n", styles: [""] });
|
|
29
|
+
}
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: UnauthorizedComponent, decorators: [{
|
|
31
|
+
type: Component,
|
|
32
|
+
args: [{ selector: 'rolatech-unauthorized', standalone: true, template: "<div class=\"p-6 max-w-lg h-auto max-h-32\">\n <div class=\"flex flex-col\">\n <b>401.</b>\n <p>Unauthorized page.</p>\n </div>\n</div>\n" }]
|
|
33
|
+
}] });
|
|
34
|
+
|
|
35
|
+
class AuthStore {
|
|
36
|
+
_state = signal({
|
|
37
|
+
userId: '',
|
|
38
|
+
user: null,
|
|
39
|
+
roles: [],
|
|
40
|
+
authenticated: false,
|
|
41
|
+
loaded: false,
|
|
42
|
+
});
|
|
43
|
+
userId = computed(() => this._state().userId);
|
|
44
|
+
user = computed(() => this._state().user);
|
|
45
|
+
roles = computed(() => this._state().roles);
|
|
46
|
+
authenticated = computed(() => this._state().authenticated);
|
|
47
|
+
loaded = computed(() => this._state().loaded);
|
|
48
|
+
update(data) {
|
|
49
|
+
this._state.update((state) => {
|
|
50
|
+
state.authenticated = data.authenticated;
|
|
51
|
+
state.userId = data.userId;
|
|
52
|
+
state.roles = data.roles;
|
|
53
|
+
state.loaded = data.loaded;
|
|
54
|
+
state.user = data.user;
|
|
55
|
+
return { ...state };
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
updateAuthenticated(authenticated) {
|
|
59
|
+
this._state.update((state) => {
|
|
60
|
+
state.authenticated = authenticated;
|
|
61
|
+
return { ...state };
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
updateUser(user) {
|
|
65
|
+
this._state.update((state) => {
|
|
66
|
+
state.user = user;
|
|
67
|
+
return { ...state };
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
updateEmail(email) {
|
|
71
|
+
this._state.update((state) => {
|
|
72
|
+
state.user.email = email;
|
|
73
|
+
return { ...state };
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AuthStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
77
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AuthStore, providedIn: 'root' });
|
|
78
|
+
}
|
|
79
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AuthStore, decorators: [{
|
|
80
|
+
type: Injectable,
|
|
81
|
+
args: [{ providedIn: 'root' }]
|
|
82
|
+
}] });
|
|
83
|
+
|
|
84
|
+
class AuthService {
|
|
85
|
+
environment = inject(APP_CONFIG);
|
|
86
|
+
http = inject(HttpClient);
|
|
87
|
+
route = inject(ActivatedRoute);
|
|
88
|
+
authStore = inject(AuthStore);
|
|
89
|
+
authenticated = this.authStore.authenticated;
|
|
90
|
+
userId = this.authStore.userId;
|
|
91
|
+
user = this.authStore.user;
|
|
92
|
+
roles = this.authStore.roles;
|
|
93
|
+
loaded = this.authStore.loaded;
|
|
94
|
+
introspect() {
|
|
95
|
+
return this.http
|
|
96
|
+
.get(`${this.environment.baseUrl}/auth/introspect`, {
|
|
97
|
+
withCredentials: true,
|
|
98
|
+
})
|
|
99
|
+
.pipe(map((res) => {
|
|
100
|
+
this.authStore.update({
|
|
101
|
+
authenticated: res.authenticated,
|
|
102
|
+
userId: res.userId,
|
|
103
|
+
roles: res.roles,
|
|
104
|
+
loaded: true,
|
|
105
|
+
});
|
|
106
|
+
if (res.authenticated) {
|
|
107
|
+
this.me().subscribe();
|
|
108
|
+
}
|
|
109
|
+
return res;
|
|
110
|
+
}));
|
|
111
|
+
}
|
|
112
|
+
me() {
|
|
113
|
+
return this.http
|
|
114
|
+
.get(`${this.environment.baseUrl}/auth/users/me`, {
|
|
115
|
+
withCredentials: true,
|
|
116
|
+
})
|
|
117
|
+
.pipe(map((res) => {
|
|
118
|
+
this.authStore.updateUser(res.data);
|
|
119
|
+
return res;
|
|
120
|
+
}));
|
|
121
|
+
}
|
|
122
|
+
wechatLogin(code, state) {
|
|
123
|
+
return this.http.post(`${this.environment.baseUrl}/auth/wechat/login?code=${code}&state=${state}`, {}, {
|
|
124
|
+
withCredentials: true,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
wechatDisconnect() {
|
|
128
|
+
return this.http.post(`${this.environment.baseUrl}/auth/wechat/disconnect`, {}, {
|
|
129
|
+
withCredentials: true,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
requestFaceIdDetect() {
|
|
133
|
+
return this.http.get(`${this.environment.baseUrl}/auth/users/face-id`, {
|
|
134
|
+
withCredentials: true,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
faceIdStatus() {
|
|
138
|
+
return this.http.get(`${this.environment.baseUrl}/auth/users/face-id/status/me`, {
|
|
139
|
+
withCredentials: true,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
faceIdStatusByToken(token) {
|
|
143
|
+
return this.http.get(`${this.environment.baseUrl}/auth/users/face-id/status/me/by`, {
|
|
144
|
+
params: { token: token },
|
|
145
|
+
withCredentials: true,
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
wechatStatus(options) {
|
|
149
|
+
return this.http.get(`${this.environment.baseUrl}/auth/wechat/status/by`, {
|
|
150
|
+
params: options,
|
|
151
|
+
withCredentials: true,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
login(data) {
|
|
155
|
+
return this.http
|
|
156
|
+
.post(`${this.environment.baseUrl}/auth/login`, data, {
|
|
157
|
+
withCredentials: true,
|
|
158
|
+
})
|
|
159
|
+
.pipe(map((res) => {
|
|
160
|
+
this.authStore.updateAuthenticated(true);
|
|
161
|
+
return res.data;
|
|
162
|
+
}));
|
|
163
|
+
}
|
|
164
|
+
logout() {
|
|
165
|
+
return this.http
|
|
166
|
+
.get(`${this.environment.baseUrl}/auth/logout`, {
|
|
167
|
+
withCredentials: true,
|
|
168
|
+
})
|
|
169
|
+
.pipe(map((res) => {
|
|
170
|
+
this.authStore.updateAuthenticated(false);
|
|
171
|
+
return res;
|
|
172
|
+
}));
|
|
173
|
+
}
|
|
174
|
+
changePassword(data) {
|
|
175
|
+
return this.http
|
|
176
|
+
.put(`${this.environment.baseUrl}/auth/users/password`, data, {
|
|
177
|
+
withCredentials: true,
|
|
178
|
+
})
|
|
179
|
+
.pipe(map((user) => {
|
|
180
|
+
return user;
|
|
181
|
+
}), tap((_) => {
|
|
182
|
+
this.authStore.updateAuthenticated(true);
|
|
183
|
+
}));
|
|
184
|
+
}
|
|
185
|
+
lookup(account, next) {
|
|
186
|
+
return this.http
|
|
187
|
+
.post(`${this.environment.baseUrl}/auth/lookup`, {
|
|
188
|
+
account,
|
|
189
|
+
next,
|
|
190
|
+
}, { withCredentials: false })
|
|
191
|
+
.pipe(map((user) => {
|
|
192
|
+
return user;
|
|
193
|
+
}));
|
|
194
|
+
}
|
|
195
|
+
challenge(username, password, next) {
|
|
196
|
+
return this.http
|
|
197
|
+
.post(`${this.environment.baseUrl}/auth/challenge`, {
|
|
198
|
+
username,
|
|
199
|
+
password,
|
|
200
|
+
next,
|
|
201
|
+
}, { withCredentials: true })
|
|
202
|
+
.pipe(map((user) => {
|
|
203
|
+
return user;
|
|
204
|
+
}), tap((_) => {
|
|
205
|
+
this.authStore.updateAuthenticated(true);
|
|
206
|
+
}));
|
|
207
|
+
}
|
|
208
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
209
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AuthService, providedIn: 'root' });
|
|
210
|
+
}
|
|
211
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AuthService, decorators: [{
|
|
212
|
+
type: Injectable,
|
|
213
|
+
args: [{ providedIn: 'root' }]
|
|
214
|
+
}] });
|
|
215
|
+
|
|
216
|
+
class FaceidDetectDialogComponent {
|
|
217
|
+
dialogRef = inject(MatDialogRef);
|
|
218
|
+
environment = inject(APP_CONFIG);
|
|
219
|
+
data = inject(MAT_DIALOG_DATA);
|
|
220
|
+
authService = inject(AuthService);
|
|
221
|
+
snackBarService = inject(SnackBarService);
|
|
222
|
+
loading = false;
|
|
223
|
+
qrcodeUrl = '';
|
|
224
|
+
verified = false;
|
|
225
|
+
interval;
|
|
226
|
+
constructor() {
|
|
227
|
+
this.request();
|
|
228
|
+
}
|
|
229
|
+
request() {
|
|
230
|
+
this.loading = true;
|
|
231
|
+
this.authService.requestFaceIdDetect().subscribe({
|
|
232
|
+
next: ({ data }) => {
|
|
233
|
+
this.genQRCode(data.url);
|
|
234
|
+
this.loop();
|
|
235
|
+
},
|
|
236
|
+
error: () => {
|
|
237
|
+
this.loading = false;
|
|
238
|
+
},
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
cancel() {
|
|
242
|
+
clearInterval(this.interval);
|
|
243
|
+
this.dialogRef.close(this.verified);
|
|
244
|
+
}
|
|
245
|
+
checkFaceIdStatus() {
|
|
246
|
+
this.loading = false;
|
|
247
|
+
this.authService.faceIdStatus().subscribe({
|
|
248
|
+
next: (res) => {
|
|
249
|
+
this.verified = res.data.verified;
|
|
250
|
+
if (res.data.verified) {
|
|
251
|
+
clearInterval(this.interval);
|
|
252
|
+
this.dialogRef.close(true);
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
this.snackBarService.open('未认证');
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
error: (error) => {
|
|
259
|
+
clearInterval(this.interval);
|
|
260
|
+
this.dialogRef.close(false);
|
|
261
|
+
},
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
loop() {
|
|
265
|
+
this.loading = false;
|
|
266
|
+
this.interval = setInterval(() => {
|
|
267
|
+
this.authService.faceIdStatus().subscribe({
|
|
268
|
+
next: (res) => {
|
|
269
|
+
if (res.data.verified) {
|
|
270
|
+
clearInterval(this.interval);
|
|
271
|
+
this.dialogRef.close(true);
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
});
|
|
275
|
+
this;
|
|
276
|
+
}, 2000);
|
|
277
|
+
}
|
|
278
|
+
async genQRCode(url) {
|
|
279
|
+
try {
|
|
280
|
+
this.qrcodeUrl = await QRCode.toDataURL(url);
|
|
281
|
+
}
|
|
282
|
+
catch (err) {
|
|
283
|
+
console.error(err);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: FaceidDetectDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
287
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.0", type: FaceidDetectDialogComponent, isStandalone: true, selector: "rolatech-faceid-detect-dialog", ngImport: i0, template: "<div class=\"flex flex-col p-3 max-w-[500px] mx-auto\">\n <div class=\"text-xl font-bold p-3\">\u4F7F\u7528\u5FAE\u4FE1\u626B\u63CF\u4E8C\u7EF4\u7801, \u5B8C\u6210\u4EBA\u8138\u5B9E\u540D\u8BA4\u8BC1</div>\n <div class=\"w-[256px] h-[256px] mx-auto flex justify-center items-center\">\n @if (loading) {\n <div>\n <rolatech-spinner></rolatech-spinner>\n </div>\n }\n\n <img [src]=\"qrcodeUrl\" />\n </div>\n <div class=\"p-3 flex justify-end items-center gap-3\">\n <button mat-button (click)=\"cancel()\">\u53D6\u6D88</button>\n <button mat-raised-button color=\"primary\" (click)=\"checkFaceIdStatus()\">\u5B8C\u6210\u8BA4\u8BC1</button>\n </div>\n</div>\n", styles: ["*{margin:0;padding:0}.normalPanel .panelContent{width:188px;height:188px}.normalPanel .wrp_code{position:relative;width:188px;height:188px;margin:0}.impowerBox .title,.normalPanel .info{display:none}.impowerBox .qrcode{margin-top:0;border:0;width:188px;height:188px}#MAXIM{content:\"veg20170418191511\"}mat-mdc-dialog-content mdc-dialog__content{padding:0}\n"], dependencies: [{ kind: "component", type: SpinnerComponent, selector: "rolatech-spinner", inputs: ["title"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }] });
|
|
288
|
+
}
|
|
289
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: FaceidDetectDialogComponent, decorators: [{
|
|
290
|
+
type: Component,
|
|
291
|
+
args: [{ selector: 'rolatech-faceid-detect-dialog', standalone: true, imports: [SpinnerComponent, MatButtonModule], template: "<div class=\"flex flex-col p-3 max-w-[500px] mx-auto\">\n <div class=\"text-xl font-bold p-3\">\u4F7F\u7528\u5FAE\u4FE1\u626B\u63CF\u4E8C\u7EF4\u7801, \u5B8C\u6210\u4EBA\u8138\u5B9E\u540D\u8BA4\u8BC1</div>\n <div class=\"w-[256px] h-[256px] mx-auto flex justify-center items-center\">\n @if (loading) {\n <div>\n <rolatech-spinner></rolatech-spinner>\n </div>\n }\n\n <img [src]=\"qrcodeUrl\" />\n </div>\n <div class=\"p-3 flex justify-end items-center gap-3\">\n <button mat-button (click)=\"cancel()\">\u53D6\u6D88</button>\n <button mat-raised-button color=\"primary\" (click)=\"checkFaceIdStatus()\">\u5B8C\u6210\u8BA4\u8BC1</button>\n </div>\n</div>\n", styles: ["*{margin:0;padding:0}.normalPanel .panelContent{width:188px;height:188px}.normalPanel .wrp_code{position:relative;width:188px;height:188px;margin:0}.impowerBox .title,.normalPanel .info{display:none}.impowerBox .qrcode{margin-top:0;border:0;width:188px;height:188px}#MAXIM{content:\"veg20170418191511\"}mat-mdc-dialog-content mdc-dialog__content{padding:0}\n"] }]
|
|
292
|
+
}], ctorParameters: () => [] });
|
|
293
|
+
|
|
294
|
+
const AuthGuard = (route, state) => {
|
|
295
|
+
const environment = inject(APP_CONFIG);
|
|
296
|
+
const platformId = inject(PLATFORM_ID);
|
|
297
|
+
const authService = inject(AuthService);
|
|
298
|
+
const router = inject(Router);
|
|
299
|
+
const isContinue = state.url.includes('continue');
|
|
300
|
+
const continueUrl = route.queryParams['continue'];
|
|
301
|
+
if (!isPlatformBrowser(platformId)) {
|
|
302
|
+
return of(false);
|
|
303
|
+
}
|
|
304
|
+
return authService.introspect().pipe(map$1(({ roles, authenticated }) => {
|
|
305
|
+
const routeRoles = route.data['roles'];
|
|
306
|
+
let passRoled = routeRoles ? roles?.some((r) => routeRoles.indexOf(r) >= 0) : true;
|
|
307
|
+
if (authenticated && !passRoled) {
|
|
308
|
+
router.navigate(['/forbidden']);
|
|
309
|
+
return false;
|
|
310
|
+
}
|
|
311
|
+
if (authenticated) {
|
|
312
|
+
if (window.location.href.includes(environment.accountsUrl) && !isContinue) {
|
|
313
|
+
window.location.href = environment.myaccountUrl;
|
|
314
|
+
}
|
|
315
|
+
if (isContinue) {
|
|
316
|
+
window.location.href = continueUrl;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
if (!isContinue) {
|
|
321
|
+
window.location.href = environment.accountsUrl + `/signin?continue=${window.location.href}`;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
return true;
|
|
325
|
+
}));
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
class AuthDialogComponent {
|
|
329
|
+
dialogRef = inject(MatDialogRef);
|
|
330
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AuthDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
331
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0", type: AuthDialogComponent, isStandalone: true, selector: "rolatech-auth-dialog", ngImport: i0, template: "<p>auth-dialog works!</p>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatDialogModule }] });
|
|
332
|
+
}
|
|
333
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AuthDialogComponent, decorators: [{
|
|
334
|
+
type: Component,
|
|
335
|
+
args: [{ selector: 'rolatech-auth-dialog', standalone: true, imports: [CommonModule, MatDialogModule], template: "<p>auth-dialog works!</p>\n" }]
|
|
336
|
+
}] });
|
|
337
|
+
|
|
338
|
+
const AuthDialogGuard = (route, state) => {
|
|
339
|
+
const authService = inject(AuthService);
|
|
340
|
+
const dialog = inject(MatDialog);
|
|
341
|
+
const environment = inject(APP_CONFIG);
|
|
342
|
+
const platformId = inject(PLATFORM_ID);
|
|
343
|
+
const isContinue = state.url.includes('continue');
|
|
344
|
+
const continueUrl = route.queryParams['continue'];
|
|
345
|
+
if (!isPlatformBrowser(platformId)) {
|
|
346
|
+
return of(false);
|
|
347
|
+
}
|
|
348
|
+
return authService.introspect().pipe(map$1(({ roles, authenticated }) => {
|
|
349
|
+
if (!authenticated) {
|
|
350
|
+
if (window.location.href.includes(environment.accountsUrl) && !isContinue) {
|
|
351
|
+
window.location.href = environment.myaccountUrl;
|
|
352
|
+
}
|
|
353
|
+
if (isContinue) {
|
|
354
|
+
window.location.href = continueUrl;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
else {
|
|
358
|
+
const dialogRef = dialog.open(AuthDialogComponent, {
|
|
359
|
+
data: {},
|
|
360
|
+
});
|
|
361
|
+
dialogRef.afterClosed().subscribe((result) => { });
|
|
362
|
+
return true;
|
|
363
|
+
}
|
|
364
|
+
return authenticated;
|
|
365
|
+
}));
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
const RoleGuard = (route, state) => {
|
|
369
|
+
const authService = inject(AuthService);
|
|
370
|
+
const environment = inject(APP_CONFIG);
|
|
371
|
+
const platformId = inject(PLATFORM_ID);
|
|
372
|
+
const snackBar = inject(MatSnackBar);
|
|
373
|
+
const router = inject(Router);
|
|
374
|
+
const isContinue = state.url.includes('continue');
|
|
375
|
+
const continueUrl = route.queryParams['continue'];
|
|
376
|
+
if (!isPlatformBrowser(platformId)) {
|
|
377
|
+
return of(false);
|
|
378
|
+
}
|
|
379
|
+
const routeRoles = route.data['roles'];
|
|
380
|
+
// if (!routeRoles) {
|
|
381
|
+
// return of(false);
|
|
382
|
+
// }
|
|
383
|
+
return authService.introspect().pipe(filter((res) => res.roles !== null && res.roles.length > 0), map$1(({ roles }) => {
|
|
384
|
+
const authed = roles.some((r) => routeRoles?.indexOf(r) >= 0);
|
|
385
|
+
if (!authed) {
|
|
386
|
+
router.navigate(['/forbidden']);
|
|
387
|
+
}
|
|
388
|
+
return authed;
|
|
389
|
+
}));
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
const PermissionGuard = (route, state) => {
|
|
393
|
+
const authService = inject(AuthService);
|
|
394
|
+
const environment = inject(APP_CONFIG);
|
|
395
|
+
const platformId = inject(PLATFORM_ID);
|
|
396
|
+
const isContinue = state.url.includes('continue');
|
|
397
|
+
const continueUrl = route.queryParams['continue'];
|
|
398
|
+
// if (!isPlatformBrowser(platformId)) {
|
|
399
|
+
// return of(false);
|
|
400
|
+
// }
|
|
401
|
+
return of(false);
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
class AuthUserService {
|
|
405
|
+
environment = inject(APP_CONFIG);
|
|
406
|
+
http = inject(HttpClient);
|
|
407
|
+
userSubject = new BehaviorSubject(JSON.parse('null'));
|
|
408
|
+
userInfo$ = this.userSubject.asObservable();
|
|
409
|
+
updateUserInfo(userInfo) {
|
|
410
|
+
this.userSubject.next(userInfo);
|
|
411
|
+
}
|
|
412
|
+
findAll(options) {
|
|
413
|
+
return this.http.get(`${this.environment.baseUrl}/auth/users`, {
|
|
414
|
+
params: options,
|
|
415
|
+
withCredentials: true,
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
findOne(userId) {
|
|
419
|
+
return this.http.get(`${this.environment.baseUrl}/auth/users/${userId}`, {
|
|
420
|
+
withCredentials: true,
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
me() {
|
|
424
|
+
return this.http
|
|
425
|
+
.get(`${this.environment.baseUrl}/auth/users/me`, {
|
|
426
|
+
withCredentials: true,
|
|
427
|
+
})
|
|
428
|
+
.pipe(map$1((res) => {
|
|
429
|
+
return res.data;
|
|
430
|
+
}));
|
|
431
|
+
}
|
|
432
|
+
getPublicUserInfo(id) {
|
|
433
|
+
return this.http
|
|
434
|
+
.get(`${this.environment.baseUrl}/auth/users/${id}/info/public`, {
|
|
435
|
+
withCredentials: false,
|
|
436
|
+
})
|
|
437
|
+
.pipe(map$1((res) => {
|
|
438
|
+
return res.data;
|
|
439
|
+
}));
|
|
440
|
+
}
|
|
441
|
+
findPublicInfoByIds(ids) {
|
|
442
|
+
const params = { ids: ids.join(',') };
|
|
443
|
+
return this.http.get(`${this.environment.baseUrl}/auth/users/by`, {
|
|
444
|
+
params: params,
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
sendSMSCode(countryCode, phone) {
|
|
448
|
+
return this.http.post(`${this.environment.baseUrl}/auth/users/verification/phone/start`, { countryCode, phone });
|
|
449
|
+
}
|
|
450
|
+
signup(data) {
|
|
451
|
+
return this.http.post(`${this.environment.baseUrl}/auth/users/signup`, data);
|
|
452
|
+
}
|
|
453
|
+
findByUsername(username) {
|
|
454
|
+
return this.http.get(`${this.environment.baseUrl}/auth/users/info`, {
|
|
455
|
+
params: { username },
|
|
456
|
+
withCredentials: true,
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
findUserInfoByUsername(username) {
|
|
460
|
+
return this.http.get(`${this.environment.baseUrl}/auth/users/info/by`, {
|
|
461
|
+
params: { username },
|
|
462
|
+
withCredentials: true,
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
findPublicInfoByRole(role) {
|
|
466
|
+
return this.http.get(`${this.environment.baseUrl}/auth/users/public/by`, {
|
|
467
|
+
params: { role: role },
|
|
468
|
+
withCredentials: false,
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
changeUsername(username) {
|
|
472
|
+
return this.http.put(`${this.environment.baseUrl}/auth/users/username`, { username }, {
|
|
473
|
+
withCredentials: true,
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
changeName(name) {
|
|
477
|
+
return this.http.put(`${this.environment.baseUrl}/auth/users/me`, { name }, {
|
|
478
|
+
withCredentials: true,
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
update(data) {
|
|
482
|
+
return this.http.put(`${this.environment.baseUrl}/auth/users/me`, data, {
|
|
483
|
+
withCredentials: true,
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
uploadAvatar(data) {
|
|
487
|
+
return this.http.post(`${this.environment.baseUrl}/auth/users/avatar`, data, {
|
|
488
|
+
withCredentials: true,
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
changePhone(phone, code) {
|
|
492
|
+
return this.http.put(`${this.environment.baseUrl}/auth/users/phone`, { phone, code }, {
|
|
493
|
+
withCredentials: true,
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
follow(username) {
|
|
497
|
+
return this.http.put(`${this.environment.baseUrl}/auth/users/following/${username}`, {}, {
|
|
498
|
+
withCredentials: true,
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
unfollow(username) {
|
|
502
|
+
return this.http.delete(`${this.environment.baseUrl}/auth/users/following/${username}`, {
|
|
503
|
+
withCredentials: true,
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
listFollowingByUsername(username) {
|
|
507
|
+
return this.http.get(`${this.environment.baseUrl}/auth/users/${username}/following`);
|
|
508
|
+
}
|
|
509
|
+
listFollowersByUsername(username) {
|
|
510
|
+
return this.http.get(`${this.environment.baseUrl}/auth/users/${username}/followers`);
|
|
511
|
+
}
|
|
512
|
+
checkIfFollowingSomeone(username, target) {
|
|
513
|
+
return this.http.get(`${this.environment.baseUrl}/auth/users/${username}/following/${target}`);
|
|
514
|
+
}
|
|
515
|
+
isFollowing(username) {
|
|
516
|
+
return this.http.get(`${this.environment.baseUrl}/auth/users/following/${username}`, { withCredentials: true });
|
|
517
|
+
}
|
|
518
|
+
friendships(ids) {
|
|
519
|
+
return this.http.post(`${this.environment.baseUrl}/auth/users/friendships`, { ids: ids }, { withCredentials: true });
|
|
520
|
+
}
|
|
521
|
+
followersStats(username) {
|
|
522
|
+
return this.http.get(`${this.environment.baseUrl}/auth/users/followers/stats/by`, { params: { username: username } });
|
|
523
|
+
}
|
|
524
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AuthUserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
525
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AuthUserService, providedIn: 'root' });
|
|
526
|
+
}
|
|
527
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AuthUserService, decorators: [{
|
|
528
|
+
type: Injectable,
|
|
529
|
+
args: [{
|
|
530
|
+
providedIn: 'root',
|
|
531
|
+
}]
|
|
532
|
+
}] });
|
|
533
|
+
|
|
534
|
+
class LocalStorage {
|
|
535
|
+
length = 0;
|
|
536
|
+
clear() { }
|
|
537
|
+
getItem(key) {
|
|
538
|
+
return null;
|
|
539
|
+
}
|
|
540
|
+
key(index) {
|
|
541
|
+
return null;
|
|
542
|
+
}
|
|
543
|
+
removeItem(key) { }
|
|
544
|
+
setItem(key, value) { }
|
|
545
|
+
}
|
|
546
|
+
class LocalstorageService {
|
|
547
|
+
storage;
|
|
548
|
+
platformId = inject(PLATFORM_ID);
|
|
549
|
+
constructor() {
|
|
550
|
+
this.storage = new LocalStorage();
|
|
551
|
+
if (isPlatformBrowser(this.platformId)) {
|
|
552
|
+
this.storage = localStorage;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
length = 0;
|
|
556
|
+
clear() {
|
|
557
|
+
this.storage.clear();
|
|
558
|
+
}
|
|
559
|
+
getItem(key) {
|
|
560
|
+
return this.storage.getItem(key);
|
|
561
|
+
}
|
|
562
|
+
key(index) {
|
|
563
|
+
return this.storage.key(index);
|
|
564
|
+
}
|
|
565
|
+
removeItem(key) {
|
|
566
|
+
return this.storage.removeItem(key);
|
|
567
|
+
}
|
|
568
|
+
setItem(key, value) {
|
|
569
|
+
return this.storage.setItem(key, value);
|
|
570
|
+
}
|
|
571
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: LocalstorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
572
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: LocalstorageService, providedIn: 'root' });
|
|
573
|
+
}
|
|
574
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: LocalstorageService, decorators: [{
|
|
575
|
+
type: Injectable,
|
|
576
|
+
args: [{
|
|
577
|
+
providedIn: 'root',
|
|
578
|
+
}]
|
|
579
|
+
}], ctorParameters: () => [] });
|
|
580
|
+
|
|
581
|
+
class ErrorInterceptor {
|
|
582
|
+
tokenSubject = new BehaviorSubject('');
|
|
583
|
+
isRefreshingToken = false;
|
|
584
|
+
authService = inject(AuthService);
|
|
585
|
+
intercept(request, next) {
|
|
586
|
+
return next.handle(request).pipe(catchError((error) => {
|
|
587
|
+
if (error instanceof HttpErrorResponse) {
|
|
588
|
+
switch (error.status) {
|
|
589
|
+
case 400:
|
|
590
|
+
return this.hand400Error(error);
|
|
591
|
+
case 401:
|
|
592
|
+
return this.hand401Error(error);
|
|
593
|
+
case 403:
|
|
594
|
+
return this.hand403Error(error);
|
|
595
|
+
case 404:
|
|
596
|
+
return this.hand404Error(error);
|
|
597
|
+
case 429:
|
|
598
|
+
return this.hand429Error(error);
|
|
599
|
+
default:
|
|
600
|
+
return this.handleDefaultError(error);
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
else {
|
|
604
|
+
return throwError(() => error);
|
|
605
|
+
}
|
|
606
|
+
}));
|
|
607
|
+
}
|
|
608
|
+
hand400Error(error) {
|
|
609
|
+
return throwError(() => error.error);
|
|
610
|
+
}
|
|
611
|
+
hand401Error(error) {
|
|
612
|
+
return throwError(() => error.error);
|
|
613
|
+
}
|
|
614
|
+
hand403Error(error) {
|
|
615
|
+
return throwError(() => error.error);
|
|
616
|
+
}
|
|
617
|
+
hand404Error(error) {
|
|
618
|
+
return throwError(() => error.error);
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
*
|
|
622
|
+
* @param error 短信验证码发送过多
|
|
623
|
+
* @returns
|
|
624
|
+
*/
|
|
625
|
+
hand429Error(error) {
|
|
626
|
+
return throwError(() => error.error);
|
|
627
|
+
}
|
|
628
|
+
handleDefaultError(error) {
|
|
629
|
+
// return throwError(() => new Error('系统错误'));
|
|
630
|
+
return throwError(() => error.error);
|
|
631
|
+
}
|
|
632
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: ErrorInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
633
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: ErrorInterceptor });
|
|
634
|
+
}
|
|
635
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: ErrorInterceptor, decorators: [{
|
|
636
|
+
type: Injectable
|
|
637
|
+
}] });
|
|
638
|
+
|
|
639
|
+
class AuthInterceptor {
|
|
640
|
+
environment = inject(APP_CONFIG);
|
|
641
|
+
platformId = inject(PLATFORM_ID);
|
|
642
|
+
authService = inject(AuthService);
|
|
643
|
+
constructor() { }
|
|
644
|
+
intercept(request, next) {
|
|
645
|
+
const authRequest = request.clone({
|
|
646
|
+
headers: request.headers.append('Client-Id', this.environment.clientId),
|
|
647
|
+
});
|
|
648
|
+
if (request.withCredentials) {
|
|
649
|
+
return next.handle(authRequest).pipe(map((res) => {
|
|
650
|
+
if (res instanceof HttpResponse && isPlatformBrowser(this.platformId)) {
|
|
651
|
+
// window.location.href = res.headers.get('Location') as string;
|
|
652
|
+
}
|
|
653
|
+
return res;
|
|
654
|
+
}), catchError$1((error) => {
|
|
655
|
+
if (isPlatformBrowser(this.platformId)) {
|
|
656
|
+
if (error.url?.includes('auth/introspect')) {
|
|
657
|
+
// if (window.location.origin !== `${this.environment.accountsUrl}`) {
|
|
658
|
+
// window.location.href = `${this.environment.accountsUrl}/signin?continue=` + window.location.href;
|
|
659
|
+
// return NEVER;
|
|
660
|
+
// }
|
|
661
|
+
}
|
|
662
|
+
if (error instanceof HttpErrorResponse && error.error.code === 'G401') {
|
|
663
|
+
window.location.href = `${this.environment.accountsUrl}/signin?continue=` + window.location.href;
|
|
664
|
+
return NEVER;
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
return throwError(() => error);
|
|
668
|
+
}));
|
|
669
|
+
}
|
|
670
|
+
const newRequest = request.clone({
|
|
671
|
+
headers: request.headers.append('Client-Id', this.environment.clientId),
|
|
672
|
+
});
|
|
673
|
+
return next.handle(newRequest);
|
|
674
|
+
}
|
|
675
|
+
addClientIdHeader(request) {
|
|
676
|
+
return request.clone({
|
|
677
|
+
setHeaders: {
|
|
678
|
+
'Client-id': this.environment.clientId,
|
|
679
|
+
},
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
addCookieHeader(request, cookie) {
|
|
683
|
+
return request.clone({
|
|
684
|
+
setHeaders: {
|
|
685
|
+
Cookie: cookie,
|
|
686
|
+
'Client-id': this.environment.clientId,
|
|
687
|
+
},
|
|
688
|
+
});
|
|
689
|
+
}
|
|
690
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AuthInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
691
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AuthInterceptor });
|
|
692
|
+
}
|
|
693
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AuthInterceptor, decorators: [{
|
|
694
|
+
type: Injectable
|
|
695
|
+
}], ctorParameters: () => [] });
|
|
696
|
+
|
|
697
|
+
function provideAngularAuth() {
|
|
698
|
+
const providers = [
|
|
699
|
+
{ provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true },
|
|
700
|
+
// {
|
|
701
|
+
// provide: ROUTES,
|
|
702
|
+
// useValue: [
|
|
703
|
+
// {
|
|
704
|
+
// path: 'forbidden',
|
|
705
|
+
// component: ForbiddenComponent,
|
|
706
|
+
// },
|
|
707
|
+
// ],
|
|
708
|
+
// multi: true,
|
|
709
|
+
// },
|
|
710
|
+
{
|
|
711
|
+
provide: HTTP_INTERCEPTORS,
|
|
712
|
+
useClass: AuthInterceptor,
|
|
713
|
+
multi: true,
|
|
714
|
+
},
|
|
715
|
+
];
|
|
716
|
+
return makeEnvironmentProviders(providers);
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
const authRoutes = [
|
|
720
|
+
{
|
|
721
|
+
path: 'unauthorized',
|
|
722
|
+
component: UnauthorizedComponent,
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
path: 'forbidden',
|
|
726
|
+
component: ForbiddenComponent,
|
|
727
|
+
},
|
|
728
|
+
];
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* Generated bundle index. Do not edit.
|
|
732
|
+
*/
|
|
733
|
+
|
|
734
|
+
export { AuthDialogGuard, AuthGuard, AuthInterceptor, AuthService, AuthStore, AuthUserService, ErrorInterceptor, FaceidDetectDialogComponent, ForbiddenComponent, LocalstorageService, PermissionGuard, RoleGuard, UnauthorizedComponent, authRoutes, provideAngularAuth };
|
|
735
|
+
//# sourceMappingURL=rolatech-angular-auth.mjs.map
|