@rxap/authentication 13.0.0 → 14.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/authentication-routing.service.mjs +3 -3
- package/esm2020/lib/authentication.guard.mjs +3 -3
- package/esm2020/lib/authentication.service.mjs +3 -3
- package/esm2020/lib/register.service.mjs +3 -3
- package/esm2020/lib/sign-out.directive.mjs +7 -7
- package/esm2020/lib/user.service.mjs +3 -3
- package/fesm2015/rxap-authentication.mjs +22 -22
- package/fesm2015/rxap-authentication.mjs.map +1 -1
- package/fesm2020/rxap-authentication.mjs +22 -22
- package/fesm2020/rxap-authentication.mjs.map +1 -1
- package/lib/sign-out.directive.d.ts +1 -1
- package/package.json +25 -36
- package/components/lib/authentication-container/authentication-container.component.d.ts +0 -7
- package/components/lib/authentication-container/authentication-container.component.module.d.ts +0 -10
- package/components/lib/authentication.module.d.ts +0 -10
- package/components/lib/fade-animation.d.ts +0 -1
- package/components/lib/loading/loading.component.d.ts +0 -15
- package/components/lib/loading/loading.component.module.d.ts +0 -8
- package/components/lib/login/login.component.d.ts +0 -13
- package/components/lib/login/login.component.module.d.ts +0 -20
- package/components/lib/login/login.form.d.ts +0 -43
- package/components/lib/reset-password/reset-password.component.d.ts +0 -5
- package/components/lib/reset-password/reset-password.component.module.d.ts +0 -18
- package/components/lib/reset-password/reset-password.form.d.ts +0 -35
- package/components/lib/routes.d.ts +0 -2
- package/components/package.json +0 -10
- package/components/public_api.d.ts +0 -13
- package/components/rxap-authentication-components.d.ts +0 -5
- package/esm2020/components/lib/authentication-container/authentication-container.component.mjs +0 -38
- package/esm2020/components/lib/authentication-container/authentication-container.component.module.mjs +0 -30
- package/esm2020/components/lib/authentication.module.mjs +0 -29
- package/esm2020/components/lib/fade-animation.mjs +0 -14
- package/esm2020/components/lib/loading/loading.component.mjs +0 -38
- package/esm2020/components/lib/loading/loading.component.module.mjs +0 -26
- package/esm2020/components/lib/login/login.component.mjs +0 -84
- package/esm2020/components/lib/login/login.component.module.mjs +0 -70
- package/esm2020/components/lib/login/login.form.mjs +0 -115
- package/esm2020/components/lib/reset-password/reset-password.component.mjs +0 -39
- package/esm2020/components/lib/reset-password/reset-password.component.module.mjs +0 -66
- package/esm2020/components/lib/reset-password/reset-password.form.mjs +0 -115
- package/esm2020/components/lib/routes.mjs +0 -32
- package/esm2020/components/public_api.mjs +0 -14
- package/esm2020/components/rxap-authentication-components.mjs +0 -5
- package/fesm2015/rxap-authentication-components.mjs +0 -629
- package/fesm2015/rxap-authentication-components.mjs.map +0 -1
- package/fesm2020/rxap-authentication-components.mjs +0 -618
- package/fesm2020/rxap-authentication-components.mjs.map +0 -1
- package/rxap-authentication.d.ts +0 -5
|
@@ -24,9 +24,9 @@ export class AuthenticationRoutingService {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
AuthenticationRoutingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
28
|
-
AuthenticationRoutingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
27
|
+
AuthenticationRoutingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: AuthenticationRoutingService, deps: [{ token: Router }, { token: RxapAuthenticationService }, { token: RXAP_AUTHENTICATION_DEACTIVATED, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
28
|
+
AuthenticationRoutingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: AuthenticationRoutingService, providedIn: 'root' });
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: AuthenticationRoutingService, decorators: [{
|
|
30
30
|
type: Injectable,
|
|
31
31
|
args: [{
|
|
32
32
|
providedIn: 'root'
|
|
@@ -90,9 +90,9 @@ export class RxapAuthenticationGuard {
|
|
|
90
90
|
return this.router.createUrlTree([lastUrl]);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
RxapAuthenticationGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
94
|
-
RxapAuthenticationGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
95
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
93
|
+
RxapAuthenticationGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationGuard, deps: [{ token: RxapAuthenticationService }, { token: Router }, { token: RXAP_AUTHENTICATION_DEACTIVATED, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
94
|
+
RxapAuthenticationGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationGuard, providedIn: 'root' });
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationGuard, decorators: [{
|
|
96
96
|
type: Injectable,
|
|
97
97
|
args: [{ providedIn: 'root' }]
|
|
98
98
|
}], ctorParameters: function () { return [{ type: i1.RxapAuthenticationService, decorators: [{
|
|
@@ -73,9 +73,9 @@ export class RxapAuthenticationService {
|
|
|
73
73
|
}, 2500);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
RxapAuthenticationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
77
|
-
RxapAuthenticationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
76
|
+
RxapAuthenticationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
77
|
+
RxapAuthenticationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationService, providedIn: 'root' });
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationService, decorators: [{
|
|
79
79
|
type: Injectable,
|
|
80
80
|
args: [{ providedIn: 'root' }]
|
|
81
81
|
}], ctorParameters: function () { return []; } });
|
|
@@ -9,9 +9,9 @@ export class RegisterService {
|
|
|
9
9
|
return Promise.resolve(true);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
RegisterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
13
|
-
RegisterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
14
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
12
|
+
RegisterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RegisterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13
|
+
RegisterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RegisterService, providedIn: 'root' });
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RegisterService, decorators: [{
|
|
15
15
|
type: Injectable,
|
|
16
16
|
args: [{ providedIn: 'root' }]
|
|
17
17
|
}], ctorParameters: function () { return []; } });
|
|
@@ -18,9 +18,9 @@ export class SignOutDirective {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
SignOutDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
22
|
-
SignOutDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
21
|
+
SignOutDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SignOutDirective, deps: [{ token: i1.RxapAuthenticationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
22
|
+
SignOutDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.2", type: SignOutDirective, selector: "[rxapSignOut]", outputs: { successful: "successful", failure: "failure" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SignOutDirective, decorators: [{
|
|
24
24
|
type: Directive,
|
|
25
25
|
args: [{
|
|
26
26
|
selector: '[rxapSignOut]'
|
|
@@ -35,10 +35,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
35
35
|
}] } });
|
|
36
36
|
export class SignOutDirectiveModule {
|
|
37
37
|
}
|
|
38
|
-
SignOutDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
39
|
-
SignOutDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
40
|
-
SignOutDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
38
|
+
SignOutDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SignOutDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
39
|
+
SignOutDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: SignOutDirectiveModule, declarations: [SignOutDirective], exports: [SignOutDirective] });
|
|
40
|
+
SignOutDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SignOutDirectiveModule });
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SignOutDirectiveModule, decorators: [{
|
|
42
42
|
type: NgModule,
|
|
43
43
|
args: [{
|
|
44
44
|
declarations: [SignOutDirective],
|
|
@@ -7,9 +7,9 @@ export class UserService {
|
|
|
7
7
|
this.user$ = new BehaviorSubject(null);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
11
|
-
UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
10
|
+
UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: UserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11
|
+
UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: UserService, providedIn: 'root' });
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: UserService, decorators: [{
|
|
13
13
|
type: Injectable,
|
|
14
14
|
args: [{ providedIn: 'root' }]
|
|
15
15
|
}] });
|
|
@@ -82,9 +82,9 @@ class RxapAuthenticationService {
|
|
|
82
82
|
}, 2500);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
RxapAuthenticationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
86
|
-
RxapAuthenticationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
87
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
85
|
+
RxapAuthenticationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
86
|
+
RxapAuthenticationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationService, providedIn: 'root' });
|
|
87
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationService, decorators: [{
|
|
88
88
|
type: Injectable,
|
|
89
89
|
args: [{ providedIn: 'root' }]
|
|
90
90
|
}], ctorParameters: function () { return []; } });
|
|
@@ -178,9 +178,9 @@ class RxapAuthenticationGuard {
|
|
|
178
178
|
return this.router.createUrlTree([lastUrl]);
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
RxapAuthenticationGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
182
|
-
RxapAuthenticationGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
181
|
+
RxapAuthenticationGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationGuard, deps: [{ token: RxapAuthenticationService }, { token: Router }, { token: RXAP_AUTHENTICATION_DEACTIVATED, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
182
|
+
RxapAuthenticationGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationGuard, providedIn: 'root' });
|
|
183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationGuard, decorators: [{
|
|
184
184
|
type: Injectable,
|
|
185
185
|
args: [{ providedIn: 'root' }]
|
|
186
186
|
}], ctorParameters: function () {
|
|
@@ -207,9 +207,9 @@ class RegisterService {
|
|
|
207
207
|
return Promise.resolve(true);
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
|
-
RegisterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
211
|
-
RegisterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
212
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
210
|
+
RegisterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RegisterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
211
|
+
RegisterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RegisterService, providedIn: 'root' });
|
|
212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RegisterService, decorators: [{
|
|
213
213
|
type: Injectable,
|
|
214
214
|
args: [{ providedIn: 'root' }]
|
|
215
215
|
}], ctorParameters: function () { return []; } });
|
|
@@ -220,9 +220,9 @@ class UserService {
|
|
|
220
220
|
this.user$ = new BehaviorSubject(null);
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
224
|
-
UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
225
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
223
|
+
UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: UserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
224
|
+
UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: UserService, providedIn: 'root' });
|
|
225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: UserService, decorators: [{
|
|
226
226
|
type: Injectable,
|
|
227
227
|
args: [{ providedIn: 'root' }]
|
|
228
228
|
}] });
|
|
@@ -245,9 +245,9 @@ class AuthenticationRoutingService {
|
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
|
-
AuthenticationRoutingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
249
|
-
AuthenticationRoutingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
248
|
+
AuthenticationRoutingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: AuthenticationRoutingService, deps: [{ token: Router }, { token: RxapAuthenticationService }, { token: RXAP_AUTHENTICATION_DEACTIVATED, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
249
|
+
AuthenticationRoutingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: AuthenticationRoutingService, providedIn: 'root' });
|
|
250
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: AuthenticationRoutingService, decorators: [{
|
|
251
251
|
type: Injectable,
|
|
252
252
|
args: [{
|
|
253
253
|
providedIn: 'root'
|
|
@@ -285,9 +285,9 @@ class SignOutDirective {
|
|
|
285
285
|
});
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
|
-
SignOutDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
289
|
-
SignOutDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
290
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
288
|
+
SignOutDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SignOutDirective, deps: [{ token: RxapAuthenticationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
289
|
+
SignOutDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.2", type: SignOutDirective, selector: "[rxapSignOut]", outputs: { successful: "successful", failure: "failure" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
|
|
290
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SignOutDirective, decorators: [{
|
|
291
291
|
type: Directive,
|
|
292
292
|
args: [{
|
|
293
293
|
selector: '[rxapSignOut]'
|
|
@@ -302,10 +302,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
302
302
|
}] } });
|
|
303
303
|
class SignOutDirectiveModule {
|
|
304
304
|
}
|
|
305
|
-
SignOutDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
306
|
-
SignOutDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
307
|
-
SignOutDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
308
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
305
|
+
SignOutDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SignOutDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
306
|
+
SignOutDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: SignOutDirectiveModule, declarations: [SignOutDirective], exports: [SignOutDirective] });
|
|
307
|
+
SignOutDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SignOutDirectiveModule });
|
|
308
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SignOutDirectiveModule, decorators: [{
|
|
309
309
|
type: NgModule,
|
|
310
310
|
args: [{
|
|
311
311
|
declarations: [SignOutDirective],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rxap-authentication.mjs","sources":["../../../../libs/authentication/src/lib/authentication.service.ts","../../../../libs/authentication/src/lib/tokens.ts","../../../../libs/authentication/src/lib/authentication.guard.ts","../../../../libs/authentication/src/lib/register.service.ts","../../../../libs/authentication/src/lib/user.service.ts","../../../../libs/authentication/src/lib/authentication-routing.service.ts","../../../../libs/authentication/src/lib/sign-out.directive.ts","../../../../libs/authentication/src/rxap-authentication.ts"],"sourcesContent":["import {\n Injectable,\n Inject,\n Optional\n} from '@angular/core';\nimport {\n BehaviorSubject,\n Observable,\n Subject,\n ReplaySubject\n} from 'rxjs';\nimport { Router } from '@angular/router';\nimport { tap } from 'rxjs/operators';\nimport { RXAP_AUTHENTICATION_DEACTIVATED } from './tokens';\n\nexport const RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY = 'rxap__authenticated';\n\nexport interface IAuthenticationService {\n isAuthenticated$: Observable<boolean | null>;\n\n requestPasswordReset(email: string): Promise<boolean>;\n\n sendPasswordReset(password: string, token: string): Promise<boolean>;\n\n signInWithEmailAndPassword(email: string, password: string, remember: boolean): Promise<boolean>;\n\n signOut(): Promise<void>;\n\n}\n\nexport function TimeoutPromise<T>(callback: (resolve: (value: T) => void, reject: (error: any) => void) => void, ms: number): Promise<T> {\n return new Promise<T>((resolve, reject) => {\n\n setTimeout(() => {\n callback(resolve, reject);\n }, ms);\n\n });\n}\n\nexport function TimeoutResolve<T>(value: T, ms: number): Promise<T> {\n return new Promise(resolve => {\n\n setTimeout(() => {\n resolve(value);\n }, ms);\n\n });\n}\n\nexport enum AuthenticationEventType {\n OnAuthSuccess = 'on-auth-success',\n OnAuthError = 'on-auth-error',\n OnLogout = 'on-logout',\n}\n\nexport interface AuthenticationEvent extends Record<string, any> {\n type: AuthenticationEventType;\n}\n\n@Injectable({ providedIn: 'root' })\n/* ignore coverage */\nexport class RxapAuthenticationService implements IAuthenticationService {\n\n public isAuthenticated$ = new BehaviorSubject<boolean | null>(null);\n\n public readonly events$ = new ReplaySubject<AuthenticationEvent>();\n\n constructor() {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n this.isAuthenticated().then(isAuthenticated => this.isAuthenticated$.next(isAuthenticated));\n }\n\n public requestPasswordReset(email: string): Promise<boolean> {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n return TimeoutResolve(email !== 'fail@fail', 2500);\n }\n\n public sendPasswordReset(password: string, token: string): Promise<boolean> {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n return TimeoutResolve(password !== 'fail', 2500);\n }\n\n public async signInWithEmailAndPassword(email: string, password: string, remember: boolean): Promise<boolean> {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n return TimeoutPromise((resolve, reject) => {\n\n const login = password !== 'fail';\n this.isAuthenticated$.next(login);\n if (login) {\n if (remember) {\n localStorage.setItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY, 'true');\n }\n resolve(login);\n this.events$.next({ type: AuthenticationEventType.OnAuthSuccess });\n } else {\n localStorage.removeItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY);\n reject(new Error('Login credentials are invalid'));\n this.events$.next({ type: AuthenticationEventType.OnAuthError });\n }\n\n }, 2500);\n\n }\n\n public async signOut(): Promise<void> {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n this.isAuthenticated$.next(false);\n localStorage.removeItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY);\n this.events$.next({ type: AuthenticationEventType.OnLogout });\n }\n\n public signInWithProvider(provider: string): Promise<boolean> {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n return Promise.resolve(false);\n }\n\n public isAuthenticated(): Promise<boolean> {\n return TimeoutPromise((resolve) => {\n resolve(localStorage.getItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY) === 'true');\n }, 2500);\n }\n\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const RXAP_AUTHENTICATION_DEACTIVATED = new InjectionToken<boolean>('rxap/authentication/deactivated');\n","import {\n Injectable,\n Inject,\n Optional\n} from '@angular/core';\nimport {\n CanActivate,\n CanActivateChild,\n ActivatedRouteSnapshot,\n RouterStateSnapshot,\n UrlTree,\n Router\n} from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { RxapAuthenticationService } from './authentication.service';\nimport {\n map,\n first,\n take\n} from 'rxjs/operators';\nimport { RXAP_AUTHENTICATION_DEACTIVATED } from './tokens';\n\n@Injectable({ providedIn: 'root' })\nexport class RxapAuthenticationGuard implements CanActivate, CanActivateChild {\n\n public lastUrl: string | null = null;\n\n constructor(\n @Inject(RxapAuthenticationService)\n public authentication: RxapAuthenticationService,\n @Inject(Router)\n public router: Router,\n @Optional()\n @Inject(RXAP_AUTHENTICATION_DEACTIVATED)\n private readonly deactivated: boolean | null = null\n ) {}\n\n public canActivate(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Promise<UrlTree | boolean> {\n console.debug('[RxapAuthenticationGuard] can activate', state.url);\n return this.checkAuthStatus(route, state);\n }\n\n public canActivateChild(\n childRoute: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Promise<UrlTree | boolean> {\n console.debug('[RxapAuthenticationGuard] can activate child', state.url);\n return this.checkAuthStatus(childRoute, state);\n }\n\n private async checkAuthStatus(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Promise<UrlTree | boolean> {\n\n if (this.deactivated) {\n return true;\n }\n\n const authenticated = await this.authentication.isAuthenticated();\n\n if (authenticated === null) {\n if (!this.lastUrl || (state.url !== '/' && !state.url.match(/authentication\\/login/))) {\n this.lastUrl = state.url;\n }\n return this.router.createUrlTree([ '/', 'authentication', 'loading' ]);\n }\n if (authenticated) {\n if (this.lastUrl && (state.url/*?*/ === '/' || state.url.match(/authentication\\/login/))) {\n const lastUrl = this.lastUrl;\n this.lastUrl = null;\n return this.createUrlTreeToLastUrl(lastUrl);\n } else {\n if (state.url.match(/authentication/)) {\n if (state.url.match(/authentication\\/reset-password/)) {\n return true;\n }\n return this.router.createUrlTree([ '/' ]);\n } else {\n this.lastUrl = null;\n return true;\n }\n }\n } else {\n if (!state.url.match(/^\\/?authentication/)) {\n this.lastUrl = state.url;\n }\n if (state.url.match(/^\\/?authentication/)) {\n if (this.lastUrl && this.lastUrl.match(/^\\/?authentication/)) {\n const lastUrl = this.lastUrl;\n this.lastUrl = null;\n return this.createUrlTreeToLastUrl(lastUrl);\n }\n return true;\n } else {\n return this.router.createUrlTree([ '/', 'authentication', 'login' ]);\n }\n }\n\n }\n\n private createUrlTreeToLastUrl(lastUrl: string): UrlTree {\n\n const urlMatch = lastUrl.match(/^([^?#]+)(\\?([^#]+))?(#(.+))?$/);\n\n if (urlMatch) {\n\n let queryParams: Record<string, string> = {};\n\n if (urlMatch[3]) {\n const queryParamsString = urlMatch[ 3 ];\n queryParams = queryParamsString.split('&').map(param => {\n const split = param.split('=');\n return { [ split[ 0 ] ]: split[ 1 ] };\n }).reduce((params, param) => ({ ...params, ...param }), {});\n }\n\n let fragment: string | undefined = undefined;\n\n if (urlMatch[5]) {\n fragment = urlMatch[5];\n }\n\n return this.router.createUrlTree([urlMatch[1]], {\n queryParams,\n fragment,\n });\n\n }\n\n return this.router.createUrlTree([lastUrl]);\n\n }\n\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\n/* ignore coverage */\nexport class RegisterService {\n\n constructor() {\n console.warn('The default RegisterService implementation should only be used in a development environment!');\n }\n\n public register(email: string, password: string): Promise<boolean> {\n return Promise.resolve(true);\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\nexport interface UserProfile {\n username: string;\n firstname?: string;\n lastname?: string;\n name?: string;\n email: string;\n photoURL?: string;\n avatarUrl?: string;\n}\n\n@Injectable({ providedIn: 'root' })\n/* ignore coverage */\nexport class UserService<User extends UserProfile = UserProfile> {\n\n public user$ = new BehaviorSubject<User | null>(null);\n\n}\n","import {\n Injectable,\n Inject,\n Optional\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport { RxapAuthenticationService } from './authentication.service';\nimport { RXAP_AUTHENTICATION_DEACTIVATED } from './tokens';\nimport { tap } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthenticationRoutingService {\n\n constructor(\n @Inject(Router)\n private readonly router: Router,\n @Inject(RxapAuthenticationService)\n private readonly authenticationService: RxapAuthenticationService,\n @Optional()\n @Inject(RXAP_AUTHENTICATION_DEACTIVATED)\n private readonly deactivated: boolean | null = null\n ) {\n if (!deactivated) {\n console.log('Authentication is enabled');\n this.authenticationService.isAuthenticated$.pipe(\n tap(isAuthenticated => {\n if (isAuthenticated) {\n return this.router.navigate([ '/' ]);\n } else {\n return this.router.navigate([ '/', 'authentication', 'login' ]);\n }\n })\n ).subscribe();\n }\n }\n\n}\n","import {\n Directive,\n NgModule,\n HostListener,\n EventEmitter,\n Output\n} from '@angular/core';\nimport { RxapAuthenticationService } from './authentication.service';\n\n@Directive({\n selector: '[rxapSignOut]'\n})\nexport class SignOutDirective {\n\n @Output()\n public successful = new EventEmitter<void>();\n\n @Output()\n public failure = new EventEmitter<Error>();\n\n constructor(private readonly auth: RxapAuthenticationService) { }\n\n @HostListener('click')\n public async onClick() {\n try {\n await this.auth.signOut();\n this.successful.emit();\n } catch (e: any) {\n this.failure.emit(e);\n }\n }\n\n}\n\n@NgModule({\n declarations: [ SignOutDirective ],\n exports: [ SignOutDirective ]\n})\nexport class SignO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AAsB;kBAJlC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAE,gBAAgB,CAAE;oBAClC,OAAO,EAAO,CAAE,gBAAgB,CAAE;iBACnC;;;ACrCD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"rxap-authentication.mjs","sources":["../../../../libs/authentication/src/lib/authentication.service.ts","../../../../libs/authentication/src/lib/tokens.ts","../../../../libs/authentication/src/lib/authentication.guard.ts","../../../../libs/authentication/src/lib/register.service.ts","../../../../libs/authentication/src/lib/user.service.ts","../../../../libs/authentication/src/lib/authentication-routing.service.ts","../../../../libs/authentication/src/lib/sign-out.directive.ts","../../../../libs/authentication/src/rxap-authentication.ts"],"sourcesContent":["import {\n Injectable,\n Inject,\n Optional\n} from '@angular/core';\nimport {\n BehaviorSubject,\n Observable,\n Subject,\n ReplaySubject\n} from 'rxjs';\nimport { Router } from '@angular/router';\nimport { tap } from 'rxjs/operators';\nimport { RXAP_AUTHENTICATION_DEACTIVATED } from './tokens';\n\nexport const RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY = 'rxap__authenticated';\n\nexport interface IAuthenticationService {\n isAuthenticated$: Observable<boolean | null>;\n\n requestPasswordReset(email: string): Promise<boolean>;\n\n sendPasswordReset(password: string, token: string): Promise<boolean>;\n\n signInWithEmailAndPassword(email: string, password: string, remember: boolean): Promise<boolean>;\n\n signOut(): Promise<void>;\n\n}\n\nexport function TimeoutPromise<T>(callback: (resolve: (value: T) => void, reject: (error: any) => void) => void, ms: number): Promise<T> {\n return new Promise<T>((resolve, reject) => {\n\n setTimeout(() => {\n callback(resolve, reject);\n }, ms);\n\n });\n}\n\nexport function TimeoutResolve<T>(value: T, ms: number): Promise<T> {\n return new Promise(resolve => {\n\n setTimeout(() => {\n resolve(value);\n }, ms);\n\n });\n}\n\nexport enum AuthenticationEventType {\n OnAuthSuccess = 'on-auth-success',\n OnAuthError = 'on-auth-error',\n OnLogout = 'on-logout',\n}\n\nexport interface AuthenticationEvent extends Record<string, any> {\n type: AuthenticationEventType;\n}\n\n@Injectable({ providedIn: 'root' })\n/* ignore coverage */\nexport class RxapAuthenticationService implements IAuthenticationService {\n\n public isAuthenticated$ = new BehaviorSubject<boolean | null>(null);\n\n public readonly events$ = new ReplaySubject<AuthenticationEvent>();\n\n constructor() {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n this.isAuthenticated().then(isAuthenticated => this.isAuthenticated$.next(isAuthenticated));\n }\n\n public requestPasswordReset(email: string): Promise<boolean> {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n return TimeoutResolve(email !== 'fail@fail', 2500);\n }\n\n public sendPasswordReset(password: string, token: string): Promise<boolean> {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n return TimeoutResolve(password !== 'fail', 2500);\n }\n\n public async signInWithEmailAndPassword(email: string, password: string, remember: boolean): Promise<boolean> {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n return TimeoutPromise((resolve, reject) => {\n\n const login = password !== 'fail';\n this.isAuthenticated$.next(login);\n if (login) {\n if (remember) {\n localStorage.setItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY, 'true');\n }\n resolve(login);\n this.events$.next({ type: AuthenticationEventType.OnAuthSuccess });\n } else {\n localStorage.removeItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY);\n reject(new Error('Login credentials are invalid'));\n this.events$.next({ type: AuthenticationEventType.OnAuthError });\n }\n\n }, 2500);\n\n }\n\n public async signOut(): Promise<void> {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n this.isAuthenticated$.next(false);\n localStorage.removeItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY);\n this.events$.next({ type: AuthenticationEventType.OnLogout });\n }\n\n public signInWithProvider(provider: string): Promise<boolean> {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n return Promise.resolve(false);\n }\n\n public isAuthenticated(): Promise<boolean> {\n return TimeoutPromise((resolve) => {\n resolve(localStorage.getItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY) === 'true');\n }, 2500);\n }\n\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const RXAP_AUTHENTICATION_DEACTIVATED = new InjectionToken<boolean>('rxap/authentication/deactivated');\n","import {\n Injectable,\n Inject,\n Optional\n} from '@angular/core';\nimport {\n CanActivate,\n CanActivateChild,\n ActivatedRouteSnapshot,\n RouterStateSnapshot,\n UrlTree,\n Router\n} from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { RxapAuthenticationService } from './authentication.service';\nimport {\n map,\n first,\n take\n} from 'rxjs/operators';\nimport { RXAP_AUTHENTICATION_DEACTIVATED } from './tokens';\n\n@Injectable({ providedIn: 'root' })\nexport class RxapAuthenticationGuard implements CanActivate, CanActivateChild {\n\n public lastUrl: string | null = null;\n\n constructor(\n @Inject(RxapAuthenticationService)\n public authentication: RxapAuthenticationService,\n @Inject(Router)\n public router: Router,\n @Optional()\n @Inject(RXAP_AUTHENTICATION_DEACTIVATED)\n private readonly deactivated: boolean | null = null\n ) {}\n\n public canActivate(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Promise<UrlTree | boolean> {\n console.debug('[RxapAuthenticationGuard] can activate', state.url);\n return this.checkAuthStatus(route, state);\n }\n\n public canActivateChild(\n childRoute: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Promise<UrlTree | boolean> {\n console.debug('[RxapAuthenticationGuard] can activate child', state.url);\n return this.checkAuthStatus(childRoute, state);\n }\n\n private async checkAuthStatus(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Promise<UrlTree | boolean> {\n\n if (this.deactivated) {\n return true;\n }\n\n const authenticated = await this.authentication.isAuthenticated();\n\n if (authenticated === null) {\n if (!this.lastUrl || (state.url !== '/' && !state.url.match(/authentication\\/login/))) {\n this.lastUrl = state.url;\n }\n return this.router.createUrlTree([ '/', 'authentication', 'loading' ]);\n }\n if (authenticated) {\n if (this.lastUrl && (state.url/*?*/ === '/' || state.url.match(/authentication\\/login/))) {\n const lastUrl = this.lastUrl;\n this.lastUrl = null;\n return this.createUrlTreeToLastUrl(lastUrl);\n } else {\n if (state.url.match(/authentication/)) {\n if (state.url.match(/authentication\\/reset-password/)) {\n return true;\n }\n return this.router.createUrlTree([ '/' ]);\n } else {\n this.lastUrl = null;\n return true;\n }\n }\n } else {\n if (!state.url.match(/^\\/?authentication/)) {\n this.lastUrl = state.url;\n }\n if (state.url.match(/^\\/?authentication/)) {\n if (this.lastUrl && this.lastUrl.match(/^\\/?authentication/)) {\n const lastUrl = this.lastUrl;\n this.lastUrl = null;\n return this.createUrlTreeToLastUrl(lastUrl);\n }\n return true;\n } else {\n return this.router.createUrlTree([ '/', 'authentication', 'login' ]);\n }\n }\n\n }\n\n private createUrlTreeToLastUrl(lastUrl: string): UrlTree {\n\n const urlMatch = lastUrl.match(/^([^?#]+)(\\?([^#]+))?(#(.+))?$/);\n\n if (urlMatch) {\n\n let queryParams: Record<string, string> = {};\n\n if (urlMatch[3]) {\n const queryParamsString = urlMatch[ 3 ];\n queryParams = queryParamsString.split('&').map(param => {\n const split = param.split('=');\n return { [ split[ 0 ] ]: split[ 1 ] };\n }).reduce((params, param) => ({ ...params, ...param }), {});\n }\n\n let fragment: string | undefined = undefined;\n\n if (urlMatch[5]) {\n fragment = urlMatch[5];\n }\n\n return this.router.createUrlTree([urlMatch[1]], {\n queryParams,\n fragment,\n });\n\n }\n\n return this.router.createUrlTree([lastUrl]);\n\n }\n\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\n/* ignore coverage */\nexport class RegisterService {\n\n constructor() {\n console.warn('The default RegisterService implementation should only be used in a development environment!');\n }\n\n public register(email: string, password: string): Promise<boolean> {\n return Promise.resolve(true);\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\nexport interface UserProfile {\n username: string;\n firstname?: string;\n lastname?: string;\n name?: string;\n email: string;\n photoURL?: string;\n avatarUrl?: string;\n}\n\n@Injectable({ providedIn: 'root' })\n/* ignore coverage */\nexport class UserService<User extends UserProfile = UserProfile> {\n\n public user$ = new BehaviorSubject<User | null>(null);\n\n}\n","import {\n Injectable,\n Inject,\n Optional\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport { RxapAuthenticationService } from './authentication.service';\nimport { RXAP_AUTHENTICATION_DEACTIVATED } from './tokens';\nimport { tap } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthenticationRoutingService {\n\n constructor(\n @Inject(Router)\n private readonly router: Router,\n @Inject(RxapAuthenticationService)\n private readonly authenticationService: RxapAuthenticationService,\n @Optional()\n @Inject(RXAP_AUTHENTICATION_DEACTIVATED)\n private readonly deactivated: boolean | null = null\n ) {\n if (!deactivated) {\n console.log('Authentication is enabled');\n this.authenticationService.isAuthenticated$.pipe(\n tap(isAuthenticated => {\n if (isAuthenticated) {\n return this.router.navigate([ '/' ]);\n } else {\n return this.router.navigate([ '/', 'authentication', 'login' ]);\n }\n })\n ).subscribe();\n }\n }\n\n}\n","import {\n Directive,\n NgModule,\n HostListener,\n EventEmitter,\n Output\n} from '@angular/core';\nimport { RxapAuthenticationService } from './authentication.service';\n\n@Directive({\n selector: '[rxapSignOut]'\n})\nexport class SignOutDirective {\n\n @Output()\n public successful = new EventEmitter<void>();\n\n @Output()\n public failure = new EventEmitter<Error>();\n\n constructor(private readonly auth: RxapAuthenticationService) { }\n\n @HostListener('click')\n public async onClick() {\n try {\n await this.auth.signOut();\n this.successful.emit();\n } catch (e: any) {\n this.failure.emit(e);\n }\n }\n\n}\n\n@NgModule({\n declarations: [ SignOutDirective ],\n exports: [ SignOutDirective ]\n})\nexport class SignOutDirectiveModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.RxapAuthenticationService"],"mappings":";;;;;;;;AAeO,MAAM,qCAAqC,GAAG,sBAAsB;AAe3D,SAAA,cAAc,CAAI,QAA6E,EAAE,EAA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AsB,EAAA,CAAA,CAAA;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAE,gBAAgB,CAAE;oBAClC,OAAO,EAAO,CAAE,gBAAgB,CAAE;iBACnC,CAAA;;;ACrCD;;AAEG;;;;"}
|
|
@@ -77,9 +77,9 @@ class RxapAuthenticationService {
|
|
|
77
77
|
}, 2500);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
RxapAuthenticationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
81
|
-
RxapAuthenticationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
82
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
80
|
+
RxapAuthenticationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
81
|
+
RxapAuthenticationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationService, providedIn: 'root' });
|
|
82
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationService, decorators: [{
|
|
83
83
|
type: Injectable,
|
|
84
84
|
args: [{ providedIn: 'root' }]
|
|
85
85
|
}], ctorParameters: function () { return []; } });
|
|
@@ -171,9 +171,9 @@ class RxapAuthenticationGuard {
|
|
|
171
171
|
return this.router.createUrlTree([lastUrl]);
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
RxapAuthenticationGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
175
|
-
RxapAuthenticationGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
176
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
174
|
+
RxapAuthenticationGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationGuard, deps: [{ token: RxapAuthenticationService }, { token: Router }, { token: RXAP_AUTHENTICATION_DEACTIVATED, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
175
|
+
RxapAuthenticationGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationGuard, providedIn: 'root' });
|
|
176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationGuard, decorators: [{
|
|
177
177
|
type: Injectable,
|
|
178
178
|
args: [{ providedIn: 'root' }]
|
|
179
179
|
}], ctorParameters: function () { return [{ type: RxapAuthenticationService, decorators: [{
|
|
@@ -198,9 +198,9 @@ class RegisterService {
|
|
|
198
198
|
return Promise.resolve(true);
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
RegisterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
202
|
-
RegisterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
203
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
201
|
+
RegisterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RegisterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
202
|
+
RegisterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RegisterService, providedIn: 'root' });
|
|
203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RegisterService, decorators: [{
|
|
204
204
|
type: Injectable,
|
|
205
205
|
args: [{ providedIn: 'root' }]
|
|
206
206
|
}], ctorParameters: function () { return []; } });
|
|
@@ -211,9 +211,9 @@ class UserService {
|
|
|
211
211
|
this.user$ = new BehaviorSubject(null);
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
215
|
-
UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
216
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
214
|
+
UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: UserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
215
|
+
UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: UserService, providedIn: 'root' });
|
|
216
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: UserService, decorators: [{
|
|
217
217
|
type: Injectable,
|
|
218
218
|
args: [{ providedIn: 'root' }]
|
|
219
219
|
}] });
|
|
@@ -236,9 +236,9 @@ class AuthenticationRoutingService {
|
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
|
-
AuthenticationRoutingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
240
|
-
AuthenticationRoutingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
241
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
239
|
+
AuthenticationRoutingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: AuthenticationRoutingService, deps: [{ token: Router }, { token: RxapAuthenticationService }, { token: RXAP_AUTHENTICATION_DEACTIVATED, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
240
|
+
AuthenticationRoutingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: AuthenticationRoutingService, providedIn: 'root' });
|
|
241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: AuthenticationRoutingService, decorators: [{
|
|
242
242
|
type: Injectable,
|
|
243
243
|
args: [{
|
|
244
244
|
providedIn: 'root'
|
|
@@ -272,9 +272,9 @@ class SignOutDirective {
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
|
-
SignOutDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
276
|
-
SignOutDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
277
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
275
|
+
SignOutDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SignOutDirective, deps: [{ token: RxapAuthenticationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
276
|
+
SignOutDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.2", type: SignOutDirective, selector: "[rxapSignOut]", outputs: { successful: "successful", failure: "failure" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
|
|
277
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SignOutDirective, decorators: [{
|
|
278
278
|
type: Directive,
|
|
279
279
|
args: [{
|
|
280
280
|
selector: '[rxapSignOut]'
|
|
@@ -289,10 +289,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
289
289
|
}] } });
|
|
290
290
|
class SignOutDirectiveModule {
|
|
291
291
|
}
|
|
292
|
-
SignOutDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
293
|
-
SignOutDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
294
|
-
SignOutDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
295
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
292
|
+
SignOutDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SignOutDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
293
|
+
SignOutDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: SignOutDirectiveModule, declarations: [SignOutDirective], exports: [SignOutDirective] });
|
|
294
|
+
SignOutDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SignOutDirectiveModule });
|
|
295
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SignOutDirectiveModule, decorators: [{
|
|
296
296
|
type: NgModule,
|
|
297
297
|
args: [{
|
|
298
298
|
declarations: [SignOutDirective],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rxap-authentication.mjs","sources":["../../../../libs/authentication/src/lib/authentication.service.ts","../../../../libs/authentication/src/lib/tokens.ts","../../../../libs/authentication/src/lib/authentication.guard.ts","../../../../libs/authentication/src/lib/register.service.ts","../../../../libs/authentication/src/lib/user.service.ts","../../../../libs/authentication/src/lib/authentication-routing.service.ts","../../../../libs/authentication/src/lib/sign-out.directive.ts","../../../../libs/authentication/src/rxap-authentication.ts"],"sourcesContent":["import {\n Injectable,\n Inject,\n Optional\n} from '@angular/core';\nimport {\n BehaviorSubject,\n Observable,\n Subject,\n ReplaySubject\n} from 'rxjs';\nimport { Router } from '@angular/router';\nimport { tap } from 'rxjs/operators';\nimport { RXAP_AUTHENTICATION_DEACTIVATED } from './tokens';\n\nexport const RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY = 'rxap__authenticated';\n\nexport interface IAuthenticationService {\n isAuthenticated$: Observable<boolean | null>;\n\n requestPasswordReset(email: string): Promise<boolean>;\n\n sendPasswordReset(password: string, token: string): Promise<boolean>;\n\n signInWithEmailAndPassword(email: string, password: string, remember: boolean): Promise<boolean>;\n\n signOut(): Promise<void>;\n\n}\n\nexport function TimeoutPromise<T>(callback: (resolve: (value: T) => void, reject: (error: any) => void) => void, ms: number): Promise<T> {\n return new Promise<T>((resolve, reject) => {\n\n setTimeout(() => {\n callback(resolve, reject);\n }, ms);\n\n });\n}\n\nexport function TimeoutResolve<T>(value: T, ms: number): Promise<T> {\n return new Promise(resolve => {\n\n setTimeout(() => {\n resolve(value);\n }, ms);\n\n });\n}\n\nexport enum AuthenticationEventType {\n OnAuthSuccess = 'on-auth-success',\n OnAuthError = 'on-auth-error',\n OnLogout = 'on-logout',\n}\n\nexport interface AuthenticationEvent extends Record<string, any> {\n type: AuthenticationEventType;\n}\n\n@Injectable({ providedIn: 'root' })\n/* ignore coverage */\nexport class RxapAuthenticationService implements IAuthenticationService {\n\n public isAuthenticated$ = new BehaviorSubject<boolean | null>(null);\n\n public readonly events$ = new ReplaySubject<AuthenticationEvent>();\n\n constructor() {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n this.isAuthenticated().then(isAuthenticated => this.isAuthenticated$.next(isAuthenticated));\n }\n\n public requestPasswordReset(email: string): Promise<boolean> {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n return TimeoutResolve(email !== 'fail@fail', 2500);\n }\n\n public sendPasswordReset(password: string, token: string): Promise<boolean> {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n return TimeoutResolve(password !== 'fail', 2500);\n }\n\n public async signInWithEmailAndPassword(email: string, password: string, remember: boolean): Promise<boolean> {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n return TimeoutPromise((resolve, reject) => {\n\n const login = password !== 'fail';\n this.isAuthenticated$.next(login);\n if (login) {\n if (remember) {\n localStorage.setItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY, 'true');\n }\n resolve(login);\n this.events$.next({ type: AuthenticationEventType.OnAuthSuccess });\n } else {\n localStorage.removeItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY);\n reject(new Error('Login credentials are invalid'));\n this.events$.next({ type: AuthenticationEventType.OnAuthError });\n }\n\n }, 2500);\n\n }\n\n public async signOut(): Promise<void> {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n this.isAuthenticated$.next(false);\n localStorage.removeItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY);\n this.events$.next({ type: AuthenticationEventType.OnLogout });\n }\n\n public signInWithProvider(provider: string): Promise<boolean> {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n return Promise.resolve(false);\n }\n\n public isAuthenticated(): Promise<boolean> {\n return TimeoutPromise((resolve) => {\n resolve(localStorage.getItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY) === 'true');\n }, 2500);\n }\n\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const RXAP_AUTHENTICATION_DEACTIVATED = new InjectionToken<boolean>('rxap/authentication/deactivated');\n","import {\n Injectable,\n Inject,\n Optional\n} from '@angular/core';\nimport {\n CanActivate,\n CanActivateChild,\n ActivatedRouteSnapshot,\n RouterStateSnapshot,\n UrlTree,\n Router\n} from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { RxapAuthenticationService } from './authentication.service';\nimport {\n map,\n first,\n take\n} from 'rxjs/operators';\nimport { RXAP_AUTHENTICATION_DEACTIVATED } from './tokens';\n\n@Injectable({ providedIn: 'root' })\nexport class RxapAuthenticationGuard implements CanActivate, CanActivateChild {\n\n public lastUrl: string | null = null;\n\n constructor(\n @Inject(RxapAuthenticationService)\n public authentication: RxapAuthenticationService,\n @Inject(Router)\n public router: Router,\n @Optional()\n @Inject(RXAP_AUTHENTICATION_DEACTIVATED)\n private readonly deactivated: boolean | null = null\n ) {}\n\n public canActivate(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Promise<UrlTree | boolean> {\n console.debug('[RxapAuthenticationGuard] can activate', state.url);\n return this.checkAuthStatus(route, state);\n }\n\n public canActivateChild(\n childRoute: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Promise<UrlTree | boolean> {\n console.debug('[RxapAuthenticationGuard] can activate child', state.url);\n return this.checkAuthStatus(childRoute, state);\n }\n\n private async checkAuthStatus(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Promise<UrlTree | boolean> {\n\n if (this.deactivated) {\n return true;\n }\n\n const authenticated = await this.authentication.isAuthenticated();\n\n if (authenticated === null) {\n if (!this.lastUrl || (state.url !== '/' && !state.url.match(/authentication\\/login/))) {\n this.lastUrl = state.url;\n }\n return this.router.createUrlTree([ '/', 'authentication', 'loading' ]);\n }\n if (authenticated) {\n if (this.lastUrl && (state.url/*?*/ === '/' || state.url.match(/authentication\\/login/))) {\n const lastUrl = this.lastUrl;\n this.lastUrl = null;\n return this.createUrlTreeToLastUrl(lastUrl);\n } else {\n if (state.url.match(/authentication/)) {\n if (state.url.match(/authentication\\/reset-password/)) {\n return true;\n }\n return this.router.createUrlTree([ '/' ]);\n } else {\n this.lastUrl = null;\n return true;\n }\n }\n } else {\n if (!state.url.match(/^\\/?authentication/)) {\n this.lastUrl = state.url;\n }\n if (state.url.match(/^\\/?authentication/)) {\n if (this.lastUrl && this.lastUrl.match(/^\\/?authentication/)) {\n const lastUrl = this.lastUrl;\n this.lastUrl = null;\n return this.createUrlTreeToLastUrl(lastUrl);\n }\n return true;\n } else {\n return this.router.createUrlTree([ '/', 'authentication', 'login' ]);\n }\n }\n\n }\n\n private createUrlTreeToLastUrl(lastUrl: string): UrlTree {\n\n const urlMatch = lastUrl.match(/^([^?#]+)(\\?([^#]+))?(#(.+))?$/);\n\n if (urlMatch) {\n\n let queryParams: Record<string, string> = {};\n\n if (urlMatch[3]) {\n const queryParamsString = urlMatch[ 3 ];\n queryParams = queryParamsString.split('&').map(param => {\n const split = param.split('=');\n return { [ split[ 0 ] ]: split[ 1 ] };\n }).reduce((params, param) => ({ ...params, ...param }), {});\n }\n\n let fragment: string | undefined = undefined;\n\n if (urlMatch[5]) {\n fragment = urlMatch[5];\n }\n\n return this.router.createUrlTree([urlMatch[1]], {\n queryParams,\n fragment,\n });\n\n }\n\n return this.router.createUrlTree([lastUrl]);\n\n }\n\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\n/* ignore coverage */\nexport class RegisterService {\n\n constructor() {\n console.warn('The default RegisterService implementation should only be used in a development environment!');\n }\n\n public register(email: string, password: string): Promise<boolean> {\n return Promise.resolve(true);\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\nexport interface UserProfile {\n username: string;\n firstname?: string;\n lastname?: string;\n name?: string;\n email: string;\n photoURL?: string;\n avatarUrl?: string;\n}\n\n@Injectable({ providedIn: 'root' })\n/* ignore coverage */\nexport class UserService<User extends UserProfile = UserProfile> {\n\n public user$ = new BehaviorSubject<User | null>(null);\n\n}\n","import {\n Injectable,\n Inject,\n Optional\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport { RxapAuthenticationService } from './authentication.service';\nimport { RXAP_AUTHENTICATION_DEACTIVATED } from './tokens';\nimport { tap } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthenticationRoutingService {\n\n constructor(\n @Inject(Router)\n private readonly router: Router,\n @Inject(RxapAuthenticationService)\n private readonly authenticationService: RxapAuthenticationService,\n @Optional()\n @Inject(RXAP_AUTHENTICATION_DEACTIVATED)\n private readonly deactivated: boolean | null = null\n ) {\n if (!deactivated) {\n console.log('Authentication is enabled');\n this.authenticationService.isAuthenticated$.pipe(\n tap(isAuthenticated => {\n if (isAuthenticated) {\n return this.router.navigate([ '/' ]);\n } else {\n return this.router.navigate([ '/', 'authentication', 'login' ]);\n }\n })\n ).subscribe();\n }\n }\n\n}\n","import {\n Directive,\n NgModule,\n HostListener,\n EventEmitter,\n Output\n} from '@angular/core';\nimport { RxapAuthenticationService } from './authentication.service';\n\n@Directive({\n selector: '[rxapSignOut]'\n})\nexport class SignOutDirective {\n\n @Output()\n public successful = new EventEmitter<void>();\n\n @Output()\n public failure = new EventEmitter<Error>();\n\n constructor(private readonly auth: RxapAuthenticationService) { }\n\n @HostListener('click')\n public async onClick() {\n try {\n await this.auth.signOut();\n this.successful.emit();\n } catch (e: any) {\n this.failure.emit(e);\n }\n }\n\n}\n\n@NgModule({\n declarations: [ SignOutDirective ],\n exports: [ SignOutDirective ]\n})\nexport class SignOutDirectiveModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAea,qCAAqC,GAAG,sBAAsB;SAe3D,cAAc,CAAI,QAA6E,EAAE,EAAU;IACzH,OAAO,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM;QAEpC,UAAU,CAAC;YACT,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;SAC3B,EAAE,EAAE,CAAC,CAAC;KAER,CAAC,CAAC;AACL,CAAC;SAEe,cAAc,CAAI,KAAQ,EAAE,EAAU;IACpD,OAAO,IAAI,OAAO,CAAC,OAAO;QAExB,UAAU,CAAC;YACT,OAAO,CAAC,KAAK,CAAC,CAAC;SAChB,EAAE,EAAE,CAAC,CAAC;KAER,CAAC,CAAC;AACL,CAAC;IAEW;AAAZ,WAAY,uBAAuB;IACjC,4DAAiC,CAAA;IACjC,wDAA6B,CAAA;IAC7B,iDAAsB,CAAA;AACxB,CAAC,EAJW,uBAAuB,KAAvB,uBAAuB,QAIlC;AAOD;MACa,yBAAyB;IAMpC;QAJO,qBAAgB,GAAG,IAAI,eAAe,CAAiB,IAAI,CAAC,CAAC;QAEpD,YAAO,GAAG,I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YAC1B,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;SACxB;QAAC,OAAO,CAAM,EAAE;YACf,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACtB;KACF;;6GAlBU,gBAAgB;iGAAhB,gBAAgB;2FAAhB,gBAAgB;kBAH5B,SAAS;mBAAC;oBACT,QAAQ,EAAE,eAAe;iBAC1B;6GAIQ,UAAU;sBADhB,MAAM;gBAIA,OAAO;sBADb,MAAM;gBAMM,OAAO;sBADnB,YAAY;uBAAC,OAAO;;MAgBV,sBAAsB;;mHAAtB,sBAAsB;oHAAtB,sBAAsB,iBA1BtB,gBAAgB,aAAhB,gBAAgB;oHA0BhB,sBAAsB;2FAAtB,sBAAsB;kBAJlC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAE,gBAAgB,CAAE;oBAClC,OAAO,EAAO,CAAE,gBAAgB,CAAE;iBACnC;;;ACrCD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"rxap-authentication.mjs","sources":["../../../../libs/authentication/src/lib/authentication.service.ts","../../../../libs/authentication/src/lib/tokens.ts","../../../../libs/authentication/src/lib/authentication.guard.ts","../../../../libs/authentication/src/lib/register.service.ts","../../../../libs/authentication/src/lib/user.service.ts","../../../../libs/authentication/src/lib/authentication-routing.service.ts","../../../../libs/authentication/src/lib/sign-out.directive.ts","../../../../libs/authentication/src/rxap-authentication.ts"],"sourcesContent":["import {\n Injectable,\n Inject,\n Optional\n} from '@angular/core';\nimport {\n BehaviorSubject,\n Observable,\n Subject,\n ReplaySubject\n} from 'rxjs';\nimport { Router } from '@angular/router';\nimport { tap } from 'rxjs/operators';\nimport { RXAP_AUTHENTICATION_DEACTIVATED } from './tokens';\n\nexport const RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY = 'rxap__authenticated';\n\nexport interface IAuthenticationService {\n isAuthenticated$: Observable<boolean | null>;\n\n requestPasswordReset(email: string): Promise<boolean>;\n\n sendPasswordReset(password: string, token: string): Promise<boolean>;\n\n signInWithEmailAndPassword(email: string, password: string, remember: boolean): Promise<boolean>;\n\n signOut(): Promise<void>;\n\n}\n\nexport function TimeoutPromise<T>(callback: (resolve: (value: T) => void, reject: (error: any) => void) => void, ms: number): Promise<T> {\n return new Promise<T>((resolve, reject) => {\n\n setTimeout(() => {\n callback(resolve, reject);\n }, ms);\n\n });\n}\n\nexport function TimeoutResolve<T>(value: T, ms: number): Promise<T> {\n return new Promise(resolve => {\n\n setTimeout(() => {\n resolve(value);\n }, ms);\n\n });\n}\n\nexport enum AuthenticationEventType {\n OnAuthSuccess = 'on-auth-success',\n OnAuthError = 'on-auth-error',\n OnLogout = 'on-logout',\n}\n\nexport interface AuthenticationEvent extends Record<string, any> {\n type: AuthenticationEventType;\n}\n\n@Injectable({ providedIn: 'root' })\n/* ignore coverage */\nexport class RxapAuthenticationService implements IAuthenticationService {\n\n public isAuthenticated$ = new BehaviorSubject<boolean | null>(null);\n\n public readonly events$ = new ReplaySubject<AuthenticationEvent>();\n\n constructor() {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n this.isAuthenticated().then(isAuthenticated => this.isAuthenticated$.next(isAuthenticated));\n }\n\n public requestPasswordReset(email: string): Promise<boolean> {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n return TimeoutResolve(email !== 'fail@fail', 2500);\n }\n\n public sendPasswordReset(password: string, token: string): Promise<boolean> {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n return TimeoutResolve(password !== 'fail', 2500);\n }\n\n public async signInWithEmailAndPassword(email: string, password: string, remember: boolean): Promise<boolean> {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n return TimeoutPromise((resolve, reject) => {\n\n const login = password !== 'fail';\n this.isAuthenticated$.next(login);\n if (login) {\n if (remember) {\n localStorage.setItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY, 'true');\n }\n resolve(login);\n this.events$.next({ type: AuthenticationEventType.OnAuthSuccess });\n } else {\n localStorage.removeItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY);\n reject(new Error('Login credentials are invalid'));\n this.events$.next({ type: AuthenticationEventType.OnAuthError });\n }\n\n }, 2500);\n\n }\n\n public async signOut(): Promise<void> {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n this.isAuthenticated$.next(false);\n localStorage.removeItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY);\n this.events$.next({ type: AuthenticationEventType.OnLogout });\n }\n\n public signInWithProvider(provider: string): Promise<boolean> {\n console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');\n return Promise.resolve(false);\n }\n\n public isAuthenticated(): Promise<boolean> {\n return TimeoutPromise((resolve) => {\n resolve(localStorage.getItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY) === 'true');\n }, 2500);\n }\n\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const RXAP_AUTHENTICATION_DEACTIVATED = new InjectionToken<boolean>('rxap/authentication/deactivated');\n","import {\n Injectable,\n Inject,\n Optional\n} from '@angular/core';\nimport {\n CanActivate,\n CanActivateChild,\n ActivatedRouteSnapshot,\n RouterStateSnapshot,\n UrlTree,\n Router\n} from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { RxapAuthenticationService } from './authentication.service';\nimport {\n map,\n first,\n take\n} from 'rxjs/operators';\nimport { RXAP_AUTHENTICATION_DEACTIVATED } from './tokens';\n\n@Injectable({ providedIn: 'root' })\nexport class RxapAuthenticationGuard implements CanActivate, CanActivateChild {\n\n public lastUrl: string | null = null;\n\n constructor(\n @Inject(RxapAuthenticationService)\n public authentication: RxapAuthenticationService,\n @Inject(Router)\n public router: Router,\n @Optional()\n @Inject(RXAP_AUTHENTICATION_DEACTIVATED)\n private readonly deactivated: boolean | null = null\n ) {}\n\n public canActivate(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Promise<UrlTree | boolean> {\n console.debug('[RxapAuthenticationGuard] can activate', state.url);\n return this.checkAuthStatus(route, state);\n }\n\n public canActivateChild(\n childRoute: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Promise<UrlTree | boolean> {\n console.debug('[RxapAuthenticationGuard] can activate child', state.url);\n return this.checkAuthStatus(childRoute, state);\n }\n\n private async checkAuthStatus(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Promise<UrlTree | boolean> {\n\n if (this.deactivated) {\n return true;\n }\n\n const authenticated = await this.authentication.isAuthenticated();\n\n if (authenticated === null) {\n if (!this.lastUrl || (state.url !== '/' && !state.url.match(/authentication\\/login/))) {\n this.lastUrl = state.url;\n }\n return this.router.createUrlTree([ '/', 'authentication', 'loading' ]);\n }\n if (authenticated) {\n if (this.lastUrl && (state.url/*?*/ === '/' || state.url.match(/authentication\\/login/))) {\n const lastUrl = this.lastUrl;\n this.lastUrl = null;\n return this.createUrlTreeToLastUrl(lastUrl);\n } else {\n if (state.url.match(/authentication/)) {\n if (state.url.match(/authentication\\/reset-password/)) {\n return true;\n }\n return this.router.createUrlTree([ '/' ]);\n } else {\n this.lastUrl = null;\n return true;\n }\n }\n } else {\n if (!state.url.match(/^\\/?authentication/)) {\n this.lastUrl = state.url;\n }\n if (state.url.match(/^\\/?authentication/)) {\n if (this.lastUrl && this.lastUrl.match(/^\\/?authentication/)) {\n const lastUrl = this.lastUrl;\n this.lastUrl = null;\n return this.createUrlTreeToLastUrl(lastUrl);\n }\n return true;\n } else {\n return this.router.createUrlTree([ '/', 'authentication', 'login' ]);\n }\n }\n\n }\n\n private createUrlTreeToLastUrl(lastUrl: string): UrlTree {\n\n const urlMatch = lastUrl.match(/^([^?#]+)(\\?([^#]+))?(#(.+))?$/);\n\n if (urlMatch) {\n\n let queryParams: Record<string, string> = {};\n\n if (urlMatch[3]) {\n const queryParamsString = urlMatch[ 3 ];\n queryParams = queryParamsString.split('&').map(param => {\n const split = param.split('=');\n return { [ split[ 0 ] ]: split[ 1 ] };\n }).reduce((params, param) => ({ ...params, ...param }), {});\n }\n\n let fragment: string | undefined = undefined;\n\n if (urlMatch[5]) {\n fragment = urlMatch[5];\n }\n\n return this.router.createUrlTree([urlMatch[1]], {\n queryParams,\n fragment,\n });\n\n }\n\n return this.router.createUrlTree([lastUrl]);\n\n }\n\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\n/* ignore coverage */\nexport class RegisterService {\n\n constructor() {\n console.warn('The default RegisterService implementation should only be used in a development environment!');\n }\n\n public register(email: string, password: string): Promise<boolean> {\n return Promise.resolve(true);\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\nexport interface UserProfile {\n username: string;\n firstname?: string;\n lastname?: string;\n name?: string;\n email: string;\n photoURL?: string;\n avatarUrl?: string;\n}\n\n@Injectable({ providedIn: 'root' })\n/* ignore coverage */\nexport class UserService<User extends UserProfile = UserProfile> {\n\n public user$ = new BehaviorSubject<User | null>(null);\n\n}\n","import {\n Injectable,\n Inject,\n Optional\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport { RxapAuthenticationService } from './authentication.service';\nimport { RXAP_AUTHENTICATION_DEACTIVATED } from './tokens';\nimport { tap } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthenticationRoutingService {\n\n constructor(\n @Inject(Router)\n private readonly router: Router,\n @Inject(RxapAuthenticationService)\n private readonly authenticationService: RxapAuthenticationService,\n @Optional()\n @Inject(RXAP_AUTHENTICATION_DEACTIVATED)\n private readonly deactivated: boolean | null = null\n ) {\n if (!deactivated) {\n console.log('Authentication is enabled');\n this.authenticationService.isAuthenticated$.pipe(\n tap(isAuthenticated => {\n if (isAuthenticated) {\n return this.router.navigate([ '/' ]);\n } else {\n return this.router.navigate([ '/', 'authentication', 'login' ]);\n }\n })\n ).subscribe();\n }\n }\n\n}\n","import {\n Directive,\n NgModule,\n HostListener,\n EventEmitter,\n Output\n} from '@angular/core';\nimport { RxapAuthenticationService } from './authentication.service';\n\n@Directive({\n selector: '[rxapSignOut]'\n})\nexport class SignOutDirective {\n\n @Output()\n public successful = new EventEmitter<void>();\n\n @Output()\n public failure = new EventEmitter<Error>();\n\n constructor(private readonly auth: RxapAuthenticationService) { }\n\n @HostListener('click')\n public async onClick() {\n try {\n await this.auth.signOut();\n this.successful.emit();\n } catch (e: any) {\n this.failure.emit(e);\n }\n }\n\n}\n\n@NgModule({\n declarations: [ SignOutDirective ],\n exports: [ SignOutDirective ]\n})\nexport class SignOutDirectiveModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.RxapAuthenticationService"],"mappings":";;;;;;;AAeO,MAAM,qCAAqC,GAAG,sBAAsB;AAe3D,SAAA,cAAc,CAAI,QAA6E,EAAE,EAAU,EAAA;IACzH,OAAO,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,KAAI;QAExC,UAAU,CAAC,MAAK;AACd,YAAA,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;SAC3B,EAAE,EAAE,CAAC,CAAC;AAET,KAAC,CAAC,CAAC;AACL,CAAC;AAEe,SAAA,cAAc,CAAI,KAAQ,EAAE,EAAU,EAAA;AACpD,IAAA,OAAO,IAAI,OAAO,CAAC,OAAO,IAAG;QAE3B,UAAU,CAAC,MAAK;YACd,OAAO,CAAC,KAAK,CAAC,CAAC;SAChB,EAAE,EAAE,CAAC,CAAC;AAET,KAAC,CAAC,CAAC;AACL,CAAC;IAEW,wBAIX;AAJD,CAAA,UAAY,uBAAuB,EAAA;AACjC,IAAA,uBAAA,CAAA,eAAA,CAAA,GAAA,iBAAiC,CAAA;AACjC,IAAA,uBAAA,CAAA,aAAA,CAAA,GAAA,eAA6B,CAAA;AAC7B,IAAA,uBAAA,CAAA,UAAA,CAAA,GAAA,WAAsB,CAAA;AACxB,CAAC,EAJW,uBAAuB,KAAvB,uBAAuB,GAIlC,EAAA,CAAA,CAAA,CAAA;AAOD;MACa,yBAAyB,CAAA;AAMpC,IAAA,WAAA,G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A,CAAA;sBADnB,YAAY;uBAAC,OAAO,CAAA;;MAgBV,sBAAsB,CAAA;;mHAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;oHAAtB,sBAAsB,EAAA,YAAA,EAAA,CA1BtB,gBAAgB,CAAA,EAAA,OAAA,EAAA,CAAhB,gBAAgB,CAAA,EAAA,CAAA,CAAA;oHA0BhB,sBAAsB,EAAA,CAAA,CAAA;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAE,gBAAgB,CAAE;oBAClC,OAAO,EAAO,CAAE,gBAAgB,CAAE;AACnC,iBAAA,CAAA;;;ACrCD;;AAEG;;;;"}
|
|
@@ -8,7 +8,7 @@ export declare class SignOutDirective {
|
|
|
8
8
|
constructor(auth: RxapAuthenticationService);
|
|
9
9
|
onClick(): Promise<void>;
|
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<SignOutDirective, never>;
|
|
11
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<SignOutDirective, "[rxapSignOut]", never, {}, { "successful": "successful"; "failure": "failure"; }, never>;
|
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SignOutDirective, "[rxapSignOut]", never, {}, { "successful": "successful"; "failure": "failure"; }, never, never, false>;
|
|
12
12
|
}
|
|
13
13
|
export declare class SignOutDirectiveModule {
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<SignOutDirectiveModule, never>;
|