@rxap/authentication 12.1.5 → 13.0.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/_theming.scss +1 -1
  2. package/components/README.md +3 -0
  3. package/components/package.json +5 -5
  4. package/esm2020/components/lib/authentication-container/authentication-container.component.mjs +38 -0
  5. package/esm2020/components/lib/authentication-container/authentication-container.component.module.mjs +30 -0
  6. package/esm2020/components/lib/authentication.module.mjs +29 -0
  7. package/esm2020/components/lib/fade-animation.mjs +14 -0
  8. package/esm2020/components/lib/loading/loading.component.mjs +38 -0
  9. package/esm2020/components/lib/loading/loading.component.module.mjs +26 -0
  10. package/esm2020/components/lib/login/login.component.mjs +84 -0
  11. package/esm2020/components/lib/login/login.component.module.mjs +70 -0
  12. package/esm2020/components/lib/login/login.form.mjs +115 -0
  13. package/esm2020/components/lib/reset-password/reset-password.component.mjs +39 -0
  14. package/esm2020/components/lib/reset-password/reset-password.component.module.mjs +66 -0
  15. package/esm2020/components/lib/reset-password/reset-password.form.mjs +115 -0
  16. package/esm2020/components/lib/routes.mjs +32 -0
  17. package/esm2020/components/public_api.mjs +13 -0
  18. package/esm2020/components/rxap-authentication-components.mjs +5 -0
  19. package/esm2020/index.mjs +8 -0
  20. package/esm2020/lib/authentication-routing.service.mjs +46 -0
  21. package/esm2020/lib/authentication.guard.mjs +110 -0
  22. package/esm2020/lib/authentication.service.mjs +72 -0
  23. package/esm2020/lib/register.service.mjs +18 -0
  24. package/esm2020/lib/sign-out.directive.mjs +48 -0
  25. package/esm2020/lib/tokens.mjs +3 -0
  26. package/esm2020/lib/user.service.mjs +16 -0
  27. package/esm2020/rxap-authentication.mjs +5 -0
  28. package/fesm2015/rxap-authentication-components.mjs +629 -0
  29. package/fesm2015/rxap-authentication-components.mjs.map +1 -0
  30. package/fesm2015/{rxap-authentication.js → rxap-authentication.mjs} +52 -48
  31. package/fesm2015/rxap-authentication.mjs.map +1 -0
  32. package/{fesm2015/rxap-authentication-components.js → fesm2020/rxap-authentication-components.mjs} +82 -111
  33. package/fesm2020/rxap-authentication-components.mjs.map +1 -0
  34. package/fesm2020/rxap-authentication.mjs +298 -0
  35. package/fesm2020/rxap-authentication.mjs.map +1 -0
  36. package/package.json +49 -25
  37. package/src/schematics/ng-add/index.js +1 -1
  38. package/src/schematics/ng-add/index.js.map +1 -1
  39. package/bundles/rxap-authentication-components.umd.js +0 -1030
  40. package/bundles/rxap-authentication-components.umd.js.map +0 -1
  41. package/bundles/rxap-authentication.umd.js +0 -697
  42. package/bundles/rxap-authentication.umd.js.map +0 -1
  43. package/esm2015/components/lib/authentication-container/authentication-container.component.js +0 -44
  44. package/esm2015/components/lib/authentication-container/authentication-container.component.js.map +0 -1
  45. package/esm2015/components/lib/authentication-container/authentication-container.component.module.js +0 -30
  46. package/esm2015/components/lib/authentication-container/authentication-container.component.module.js.map +0 -1
  47. package/esm2015/components/lib/authentication.module.js +0 -29
  48. package/esm2015/components/lib/authentication.module.js.map +0 -1
  49. package/esm2015/components/lib/fade-animation.js +0 -14
  50. package/esm2015/components/lib/fade-animation.js.map +0 -1
  51. package/esm2015/components/lib/loading/loading.component.js +0 -45
  52. package/esm2015/components/lib/loading/loading.component.js.map +0 -1
  53. package/esm2015/components/lib/loading/loading.component.module.js +0 -26
  54. package/esm2015/components/lib/loading/loading.component.module.js.map +0 -1
  55. package/esm2015/components/lib/login/login.component.js +0 -94
  56. package/esm2015/components/lib/login/login.component.js.map +0 -1
  57. package/esm2015/components/lib/login/login.component.module.js +0 -70
  58. package/esm2015/components/lib/login/login.component.module.js.map +0 -1
  59. package/esm2015/components/lib/login/login.form.js +0 -115
  60. package/esm2015/components/lib/login/login.form.js.map +0 -1
  61. package/esm2015/components/lib/reset-password/reset-password.component.js +0 -46
  62. package/esm2015/components/lib/reset-password/reset-password.component.js.map +0 -1
  63. package/esm2015/components/lib/reset-password/reset-password.component.module.js +0 -66
  64. package/esm2015/components/lib/reset-password/reset-password.component.module.js.map +0 -1
  65. package/esm2015/components/lib/reset-password/reset-password.form.js +0 -115
  66. package/esm2015/components/lib/reset-password/reset-password.form.js.map +0 -1
  67. package/esm2015/components/lib/routes.js +0 -32
  68. package/esm2015/components/lib/routes.js.map +0 -1
  69. package/esm2015/components/public_api.js +0 -13
  70. package/esm2015/components/public_api.js.map +0 -1
  71. package/esm2015/components/rxap-authentication-components.js +0 -5
  72. package/esm2015/components/rxap-authentication-components.js.map +0 -1
  73. package/esm2015/index.js +0 -8
  74. package/esm2015/index.js.map +0 -1
  75. package/esm2015/lib/authentication-routing.service.js +0 -46
  76. package/esm2015/lib/authentication-routing.service.js.map +0 -1
  77. package/esm2015/lib/authentication.guard.js +0 -113
  78. package/esm2015/lib/authentication.guard.js.map +0 -1
  79. package/esm2015/lib/authentication.service.js +0 -77
  80. package/esm2015/lib/authentication.service.js.map +0 -1
  81. package/esm2015/lib/register.service.js +0 -18
  82. package/esm2015/lib/register.service.js.map +0 -1
  83. package/esm2015/lib/sign-out.directive.js +0 -51
  84. package/esm2015/lib/sign-out.directive.js.map +0 -1
  85. package/esm2015/lib/tokens.js +0 -3
  86. package/esm2015/lib/tokens.js.map +0 -1
  87. package/esm2015/lib/user.service.js +0 -16
  88. package/esm2015/lib/user.service.js.map +0 -1
  89. package/esm2015/rxap-authentication.js +0 -5
  90. package/esm2015/rxap-authentication.js.map +0 -1
  91. package/fesm2015/rxap-authentication-components.js.map +0 -1
  92. package/fesm2015/rxap-authentication.js.map +0 -1
@@ -1,113 +0,0 @@
1
- import { __awaiter } from "tslib";
2
- import { Injectable, Inject, Optional } from '@angular/core';
3
- import { Router } from '@angular/router';
4
- import { RxapAuthenticationService } from './authentication.service';
5
- import { RXAP_AUTHENTICATION_DEACTIVATED } from './tokens';
6
- import * as i0 from "@angular/core";
7
- import * as i1 from "./authentication.service";
8
- import * as i2 from "@angular/router";
9
- export class RxapAuthenticationGuard {
10
- constructor(authentication, router, deactivated = null) {
11
- this.authentication = authentication;
12
- this.router = router;
13
- this.deactivated = deactivated;
14
- this.lastUrl = null;
15
- }
16
- canActivate(route, state) {
17
- console.debug('[RxapAuthenticationGuard] can activate', state.url);
18
- return this.checkAuthStatus(route, state);
19
- }
20
- canActivateChild(childRoute, state) {
21
- console.debug('[RxapAuthenticationGuard] can activate child', state.url);
22
- return this.checkAuthStatus(childRoute, state);
23
- }
24
- checkAuthStatus(route, state) {
25
- return __awaiter(this, void 0, void 0, function* () {
26
- if (this.deactivated) {
27
- return true;
28
- }
29
- const authenticated = yield this.authentication.isAuthenticated();
30
- if (authenticated === null) {
31
- if (!this.lastUrl || (state.url !== '/' && !state.url.match(/authentication\/login/))) {
32
- this.lastUrl = state.url;
33
- }
34
- return this.router.createUrlTree(['/', 'authentication', 'loading']);
35
- }
36
- if (authenticated) {
37
- if (this.lastUrl && (state.url /*?*/ === '/' || state.url.match(/authentication\/login/))) {
38
- const lastUrl = this.lastUrl;
39
- this.lastUrl = null;
40
- return this.createUrlTreeToLastUrl(lastUrl);
41
- }
42
- else {
43
- if (state.url.match(/authentication/)) {
44
- if (state.url.match(/authentication\/reset-password/)) {
45
- return true;
46
- }
47
- return this.router.createUrlTree(['/']);
48
- }
49
- else {
50
- this.lastUrl = null;
51
- return true;
52
- }
53
- }
54
- }
55
- else {
56
- if (!state.url.match(/^\/?authentication/)) {
57
- this.lastUrl = state.url;
58
- }
59
- if (state.url.match(/^\/?authentication/)) {
60
- if (this.lastUrl && this.lastUrl.match(/^\/?authentication/)) {
61
- const lastUrl = this.lastUrl;
62
- this.lastUrl = null;
63
- return this.createUrlTreeToLastUrl(lastUrl);
64
- }
65
- return true;
66
- }
67
- else {
68
- return this.router.createUrlTree(['/', 'authentication', 'login']);
69
- }
70
- }
71
- });
72
- }
73
- createUrlTreeToLastUrl(lastUrl) {
74
- const urlMatch = lastUrl.match(/^([^?#]+)(\?([^#]+))?(#(.+))?$/);
75
- if (urlMatch) {
76
- let queryParams = {};
77
- if (urlMatch[3]) {
78
- const queryParamsString = urlMatch[3];
79
- queryParams = queryParamsString.split('&').map(param => {
80
- const split = param.split('=');
81
- return { [split[0]]: split[1] };
82
- }).reduce((params, param) => (Object.assign(Object.assign({}, params), param)), {});
83
- }
84
- let fragment = undefined;
85
- if (urlMatch[5]) {
86
- fragment = urlMatch[5];
87
- }
88
- return this.router.createUrlTree([urlMatch[1]], {
89
- queryParams,
90
- fragment,
91
- });
92
- }
93
- return this.router.createUrlTree([lastUrl]);
94
- }
95
- }
96
- RxapAuthenticationGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RxapAuthenticationGuard, deps: [{ token: RxapAuthenticationService }, { token: Router }, { token: RXAP_AUTHENTICATION_DEACTIVATED, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
97
- RxapAuthenticationGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RxapAuthenticationGuard, providedIn: 'root' });
98
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RxapAuthenticationGuard, decorators: [{
99
- type: Injectable,
100
- args: [{ providedIn: 'root' }]
101
- }], ctorParameters: function () { return [{ type: i1.RxapAuthenticationService, decorators: [{
102
- type: Inject,
103
- args: [RxapAuthenticationService]
104
- }] }, { type: i2.Router, decorators: [{
105
- type: Inject,
106
- args: [Router]
107
- }] }, { type: undefined, decorators: [{
108
- type: Optional
109
- }, {
110
- type: Inject,
111
- args: [RXAP_AUTHENTICATION_DEACTIVATED]
112
- }] }]; } });
113
- //# sourceMappingURL=authentication.guard.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"authentication.guard.js","sourceRoot":"","sources":["../../../../../libs/authentication/src/lib/authentication.guard.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,MAAM,EACN,QAAQ,EACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAML,MAAM,EACP,MAAM,iBAAiB,CAAC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N,+BAA+B;wHAV9B,uBAAuB,cADV,MAAM;2FACnB,uBAAuB;kBADnC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;0BAM7B,MAAM;2BAAC,yBAAyB;;0BAEhC,MAAM;2BAAC,MAAM;;0BAEb,QAAQ;;0BACR,MAAM;2BAAC,+BAA+B","sourcesContent":["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"]}
@@ -1,77 +0,0 @@
1
- import { __awaiter } from "tslib";
2
- import { Injectable } from '@angular/core';
3
- import { BehaviorSubject } from 'rxjs';
4
- import * as i0 from "@angular/core";
5
- export const RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY = 'rxap__authenticated';
6
- export function TimeoutPromise(callback, ms) {
7
- return new Promise((resolve, reject) => {
8
- setTimeout(() => {
9
- callback(resolve, reject);
10
- }, ms);
11
- });
12
- }
13
- export function TimeoutResolve(value, ms) {
14
- return new Promise(resolve => {
15
- setTimeout(() => {
16
- resolve(value);
17
- }, ms);
18
- });
19
- }
20
- /* ignore coverage */
21
- export class RxapAuthenticationService {
22
- constructor() {
23
- this.isAuthenticated$ = new BehaviorSubject(null);
24
- console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');
25
- this.isAuthenticated().then(isAuthenticated => this.isAuthenticated$.next(isAuthenticated));
26
- }
27
- requestPasswordReset(email) {
28
- console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');
29
- return TimeoutResolve(email !== 'fail@fail', 2500);
30
- }
31
- sendPasswordReset(password, token) {
32
- console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');
33
- return TimeoutResolve(password !== 'fail', 2500);
34
- }
35
- signInWithEmailAndPassword(email, password, remember) {
36
- return __awaiter(this, void 0, void 0, function* () {
37
- console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');
38
- return TimeoutPromise((resolve, reject) => {
39
- const login = password !== 'fail';
40
- this.isAuthenticated$.next(login);
41
- if (login) {
42
- if (remember) {
43
- localStorage.setItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY, 'true');
44
- }
45
- resolve(login);
46
- }
47
- else {
48
- localStorage.removeItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY);
49
- reject(new Error('Login credentials are invalid'));
50
- }
51
- }, 2500);
52
- });
53
- }
54
- signOut() {
55
- return __awaiter(this, void 0, void 0, function* () {
56
- console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');
57
- this.isAuthenticated$.next(false);
58
- localStorage.removeItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY);
59
- });
60
- }
61
- signInWithProvider(provider) {
62
- console.warn('The default RxapAuthenticationService implementation should only be used in a development environment!');
63
- return Promise.resolve(false);
64
- }
65
- isAuthenticated() {
66
- return TimeoutPromise((resolve) => {
67
- resolve(localStorage.getItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY) === 'true');
68
- }, 2500);
69
- }
70
- }
71
- RxapAuthenticationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RxapAuthenticationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
72
- RxapAuthenticationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RxapAuthenticationService, providedIn: 'root' });
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RxapAuthenticationService, decorators: [{
74
- type: Injectable,
75
- args: [{ providedIn: 'root' }]
76
- }], ctorParameters: function () { return []; } });
77
- //# sourceMappingURL=authentication.service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"authentication.service.js","sourceRoot":"","sources":["../../../../../libs/authentication/src/lib/authentication.service.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAGX,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,eAAe,EAEhB,MAAM,MAAM,CAAC;;AAKd,MAAM,CAAC,MAAM,qCAAqC,GAAG,qBAAqB,CAAC;AAe3E,MAAM,UAAU,cAAc,CAAI,QAA6E,EAAE,EAAU;IACzH,OAAO,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAExC,UAAU,CAAC,GAAG,EAAE;YACd,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC5B,CAAC,EAAE,EAAE,CAAC,CAAC;IAET,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,cAAc,CAAI,KAAQ,EAAE,EAAU;IACpD,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;QAE3B,UAAU,CAAC,GAAG,EAAE;YACd,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC,EAAE,EAAE,CAAC,CAAC;IAET,CAAC,CAAC,CAAC;AACL,CAA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AAC,CAAC;QAEX,CAAC;KAAA;IAEY,OAAO;;YAClB,OAAO,CAAC,IAAI,CAAC,wGAAwG,CAAC,CAAC;YACvH,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAClC,YAAY,CAAC,UAAU,CAAC,qCAAqC,CAAC,CAAC;QACjE,CAAC;KAAA;IAEM,kBAAkB,CAAC,QAAgB;QACxC,OAAO,CAAC,IAAI,CAAC,wGAAwG,CAAC,CAAC;QACvH,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;IAEM,eAAe;QACpB,OAAO,cAAc,CAAC,CAAC,OAAO,EAAE,EAAE;YAChC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,qCAAqC,CAAC,KAAK,MAAM,CAAC,CAAC;QAClF,CAAC,EAAE,IAAI,CAAC,CAAC;IACX,CAAC;;sHAtDU,yBAAyB;0HAAzB,yBAAyB,cAFZ,MAAM;2FAEnB,yBAAyB;kBAFrC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE","sourcesContent":["import {\n Injectable,\n Inject,\n Optional\n} from '@angular/core';\nimport {\n BehaviorSubject,\n Observable\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\n@Injectable({ providedIn: 'root' })\n/* ignore coverage */\nexport class RxapAuthenticationService implements IAuthenticationService {\n\n public isAuthenticated$ = new BehaviorSubject<boolean | null>(null);\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 } else {\n localStorage.removeItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY);\n reject(new Error('Login credentials are invalid'));\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 }\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"]}
@@ -1,18 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- /* ignore coverage */
4
- export class RegisterService {
5
- constructor() {
6
- console.warn('The default RegisterService implementation should only be used in a development environment!');
7
- }
8
- register(email, password) {
9
- return Promise.resolve(true);
10
- }
11
- }
12
- RegisterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RegisterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
13
- RegisterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RegisterService, providedIn: 'root' });
14
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RegisterService, decorators: [{
15
- type: Injectable,
16
- args: [{ providedIn: 'root' }]
17
- }], ctorParameters: function () { return []; } });
18
- //# sourceMappingURL=register.service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register.service.js","sourceRoot":"","sources":["../../../../../libs/authentication/src/lib/register.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;;AAG3C,qBAAqB;AACrB,MAAM,OAAO,eAAe;IAE1B;QACE,OAAO,CAAC,IAAI,CAAC,8FAA8F,CAAC,CAAC;IAC/G,CAAC;IAEM,QAAQ,CAAC,KAAa,EAAE,QAAgB;QAC7C,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;;4GARU,eAAe;gHAAf,eAAe,cAFF,MAAM;2FAEnB,eAAe;kBAF3B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE","sourcesContent":["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"]}
@@ -1,51 +0,0 @@
1
- import { __awaiter } from "tslib";
2
- import { Directive, NgModule, HostListener, EventEmitter, Output } from '@angular/core';
3
- import { RxapAuthenticationService } from './authentication.service';
4
- import * as i0 from "@angular/core";
5
- import * as i1 from "./authentication.service";
6
- export class SignOutDirective {
7
- constructor(auth) {
8
- this.auth = auth;
9
- this.successful = new EventEmitter();
10
- this.failure = new EventEmitter();
11
- }
12
- onClick() {
13
- return __awaiter(this, void 0, void 0, function* () {
14
- try {
15
- yield this.auth.signOut();
16
- this.successful.emit();
17
- }
18
- catch (e) {
19
- this.failure.emit(e);
20
- }
21
- });
22
- }
23
- }
24
- SignOutDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: SignOutDirective, deps: [{ token: i1.RxapAuthenticationService }], target: i0.ɵɵFactoryTarget.Directive });
25
- SignOutDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: SignOutDirective, selector: "[rxapSignOut]", outputs: { successful: "successful", failure: "failure" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: SignOutDirective, decorators: [{
27
- type: Directive,
28
- args: [{
29
- selector: '[rxapSignOut]'
30
- }]
31
- }], ctorParameters: function () { return [{ type: i1.RxapAuthenticationService }]; }, propDecorators: { successful: [{
32
- type: Output
33
- }], failure: [{
34
- type: Output
35
- }], onClick: [{
36
- type: HostListener,
37
- args: ['click']
38
- }] } });
39
- export class SignOutDirectiveModule {
40
- }
41
- SignOutDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: SignOutDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
42
- SignOutDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: SignOutDirectiveModule, declarations: [SignOutDirective], exports: [SignOutDirective] });
43
- SignOutDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: SignOutDirectiveModule });
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: SignOutDirectiveModule, decorators: [{
45
- type: NgModule,
46
- args: [{
47
- declarations: [SignOutDirective],
48
- exports: [SignOutDirective]
49
- }]
50
- }] });
51
- //# sourceMappingURL=sign-out.directive.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sign-out.directive.js","sourceRoot":"","sources":["../../../../../libs/authentication/src/lib/sign-out.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,MAAM,EACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;;;AAKrE,MAAM,OAAO,gBAAgB;IAQ3B,YAA6B,IAA+B;QAA/B,SAAI,GAAJ,IAAI,CAA2B;QALrD,eAAU,GAAG,IAAI,YAAY,EAAQ,CAAC;QAGtC,YAAO,GAAG,IAAI,YAAY,EAAS,CAAC;IAEqB,CAAC;IAGpD,OAAO;;YAClB,IAAI;gBACF,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;gBAC1B,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;aACxB;YAAC,OAAO,CAAC,EAAE;gBACV,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACtB;QACH,CAAC;KAAA;;6GAlBU,gBAAgB;iGAAhB,gBAAgB;2FAAhB,gBAAgB;kBAH5B,SAAS;mBAAC;oBACT,QAAQ,EAAE,eAAe;iBAC1B;gHAIQ,UAAU;sBADhB,MAAM;gBAIA,OAAO;sBADb,MAAM;gBAMM,OAAO;sBADnB,YAAY;uBAAC,OAAO;;AAgBvB,MAAM,OAAO,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","sourcesContent":["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) {\n this.failure.emit(e);\n }\n }\n\n}\n\n@NgModule({\n declarations: [ SignOutDirective ],\n exports: [ SignOutDirective ]\n})\nexport class SignOutDirectiveModule {}\n"]}
@@ -1,3 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- export const RXAP_AUTHENTICATION_DEACTIVATED = new InjectionToken('rxap/authentication/deactivated');
3
- //# sourceMappingURL=tokens.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../../../libs/authentication/src/lib/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,CAAC,MAAM,+BAA+B,GAAG,IAAI,cAAc,CAAU,iCAAiC,CAAC,CAAC","sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const RXAP_AUTHENTICATION_DEACTIVATED = new InjectionToken<boolean>('rxap/authentication/deactivated');\n"]}
@@ -1,16 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import { BehaviorSubject } from 'rxjs';
3
- import * as i0 from "@angular/core";
4
- /* ignore coverage */
5
- export class UserService {
6
- constructor() {
7
- this.user$ = new BehaviorSubject(null);
8
- }
9
- }
10
- UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: UserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11
- UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: UserService, providedIn: 'root' });
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: UserService, decorators: [{
13
- type: Injectable,
14
- args: [{ providedIn: 'root' }]
15
- }] });
16
- //# sourceMappingURL=user.service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"user.service.js","sourceRoot":"","sources":["../../../../../libs/authentication/src/lib/user.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;;AAavC,qBAAqB;AACrB,MAAM,OAAO,WAAW;IAFxB;QAIS,UAAK,GAAG,IAAI,eAAe,CAAc,IAAI,CAAC,CAAC;KAEvD;;wGAJY,WAAW;4GAAX,WAAW,cAFE,MAAM;2FAEnB,WAAW;kBAFvB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE","sourcesContent":["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"]}
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './index';
5
- //# sourceMappingURL=rxap-authentication.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rxap-authentication.js","sourceRoot":"","sources":["../../../../libs/authentication/src/rxap-authentication.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC","sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"rxap-authentication-components.js","sources":["../../../../libs/authentication/components/src/lib/login/login.form.ts","../../../../libs/authentication/components/src/lib/fade-animation.ts","../../../../libs/authentication/components/src/lib/login/login.component.ts","../../../../libs/authentication/components/src/lib/login/login.component.html","../../../../libs/authentication/components/src/lib/login/login.component.module.ts","../../../../libs/authentication/components/src/lib/authentication-container/authentication-container.component.ts","../../../../libs/authentication/components/src/lib/authentication-container/authentication-container.component.html","../../../../libs/authentication/components/src/lib/authentication-container/authentication-container.component.module.ts","../../../../libs/authentication/components/src/lib/reset-password/reset-password.form.ts","../../../../libs/authentication/components/src/lib/reset-password/reset-password.component.ts","../../../../libs/authentication/components/src/lib/reset-password/reset-password.component.html","../../../../libs/authentication/components/src/lib/reset-password/reset-password.component.module.ts","../../../../libs/authentication/components/src/lib/loading/loading.component.ts","../../../../libs/authentication/components/src/lib/loading/loading.component.html","../../../../libs/authentication/components/src/lib/loading/loading.component.module.ts","../../../../libs/authentication/components/src/lib/authentication.module.ts","../../../../libs/authentication/components/src/lib/routes.ts","../../../../libs/authentication/components/src/rxap-authentication-components.ts"],"sourcesContent":["import {\n Injectable,\n Provider,\n Injector,\n INJECTOR,\n Inject,\n} from '@angular/core';\nimport { RxapAuthenticationService } from '@rxap/authentication';\nimport {\n RxapFormBuilder,\n RXAP_FORM_DEFINITION_BUILDER,\n RXAP_FORM_DEFINITION,\n FormDefinition,\n RxapForm,\n UseFormControl,\n RxapFormControl,\n RxapFormGroup,\n FormSubmitMethod,\n RXAP_FORM_SUBMIT_METHOD,\n FormSubmitSuccessfulMethod,\n RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD,\n FormType,\n} from '@rxap/forms';\nimport { Validators } from '@angular/forms';\nimport { ConfigService } from '@rxap/config';\nimport { RxapOnInit } from '@rxap/utilities';\nimport { Router } from '@angular/router';\n\nexport interface ILoginForm {\n email: string;\n password: string;\n}\n\n@RxapForm({\n id: 'rxap-login',\n providers: [\n {\n provide: ConfigService,\n useExisting: ConfigService,\n },\n ],\n})\n@Injectable()\nexport class LoginForm implements FormType<ILoginForm>, RxapOnInit {\n public rxapFormGroup!: RxapFormGroup;\n\n public loading = true;\n public loginFailed = false;\n\n @UseFormControl({\n validators: [Validators.required, Validators.email],\n })\n public email!: RxapFormControl<string>;\n\n @UseFormControl({\n validators: [Validators.required],\n })\n public password!: RxapFormControl;\n\n @UseFormControl({\n state: true,\n })\n public remember!: RxapFormControl;\n\n constructor(public readonly config: ConfigService<any>) {}\n\n public rxapOnInit() {\n const email = this.config.get<string>('authentication.default.email');\n if (email) {\n this.email.setValue(email);\n }\n const password = this.config.get<string>('authentication.default.password');\n if (password) {\n this.password.setValue(password);\n }\n }\n}\n\n@Injectable()\nexport class LoginFormSubmitMethod implements FormSubmitMethod<any> {\n constructor(private readonly authentication: RxapAuthenticationService) {}\n\n public call(value: {\n email: string;\n password: string;\n remember: boolean;\n }): Promise<any> {\n return this.authentication.signInWithEmailAndPassword(\n value.email,\n value.password,\n value.remember\n );\n }\n}\n\n@Injectable()\nexport class LoginFormSubmitSuccessful\n implements FormSubmitSuccessfulMethod<any>\n{\n constructor(\n @Inject(Router)\n private readonly router: Router\n ) {}\n\n public call(): Promise<any> {\n return this.router.navigate(['/']);\n }\n}\n\nexport const LoginFormProviders: Provider[] = [\n LoginForm,\n {\n provide: RXAP_FORM_DEFINITION_BUILDER,\n useFactory: (injector: Injector) =>\n new RxapFormBuilder<ILoginForm>(LoginForm, injector),\n deps: [INJECTOR],\n },\n {\n provide: RXAP_FORM_DEFINITION,\n useFactory: (builder: RxapFormBuilder) => builder.build(),\n deps: [RXAP_FORM_DEFINITION_BUILDER],\n },\n {\n provide: RXAP_FORM_SUBMIT_METHOD,\n useClass: LoginFormSubmitMethod,\n },\n {\n provide: RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD,\n useClass: LoginFormSubmitSuccessful,\n },\n];\n","// the fade-in/fade-out animation.\nimport {\n trigger,\n state,\n style,\n transition,\n animate\n} from '@angular/animations';\n\nexport const fadeAnimation = trigger('fadeAnimation', [\n\n // the \"in\" style determines the \"resting\" state of the element when it is visible.\n state('in', style({ opacity: 1 })),\n\n // fade in when created. this could also be written as transition('void => *')\n transition(':enter', [\n style({ opacity: 0 }),\n animate(300)\n ]),\n\n // fade out when destroyed. this could also be written as transition('void => *')\n transition(\n ':leave',\n animate(300, style({ opacity: 0 }))\n )\n]);\n","import {\n Component,\n ChangeDetectionStrategy,\n Inject\n} from '@angular/core';\nimport { LoginFormProviders } from './login.form';\nimport {\n ErrorStateMatcher,\n ShowOnDirtyErrorStateMatcher\n} from '@angular/material/core';\nimport { fadeAnimation } from '../fade-animation';\nimport { RxapAuthenticationService } from '@rxap/authentication';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { ToggleSubject } from '@rxap/utilities/rxjs';\n\n@Component({\n selector: 'rxap-login',\n templateUrl: './login.component.html',\n styleUrls: [ './login.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n LoginFormProviders,\n {\n provide: ErrorStateMatcher,\n useClass: ShowOnDirtyErrorStateMatcher\n }\n ],\n animations: [\n fadeAnimation\n ]\n})\nexport class LoginComponent {\n\n public readonly requestingPasswordReset$ = new ToggleSubject();\n\n constructor(\n @Inject(RxapAuthenticationService)\n private readonly authentication: RxapAuthenticationService,\n @Inject(MatSnackBar)\n private readonly snackBar: MatSnackBar\n ) {}\n\n public async requestPasswordReset(email: string) {\n this.requestingPasswordReset$.enable();\n try {\n const result = await this.authentication.requestPasswordReset(email);\n\n if (!result) {\n this.snackBar.open(\n 'The password reset request result is falsy',\n undefined,\n {\n duration: 5000,\n panelClass: 'error'\n }\n );\n } else {\n this.snackBar.open(\n 'The password reset request was successful',\n undefined,\n {\n duration: 3000\n }\n );\n }\n\n } catch (e) {\n this.snackBar.open(\n e.message,\n undefined,\n {\n duration: 3000,\n panelClass: 'error'\n }\n );\n } finally {\n this.requestingPasswordReset$.disable();\n }\n\n }\n}\n","<form rxapForm class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\" #form=\"rxapForm\" fxLayoutGap=\"32px\" [@fadeAnimation]=\"'in'\"\n novalidate>\n\n <div class=\"header\" fxLayout=\"column\" fxLayoutAlign=\"center center\" fxFlex=\"nogrow\">\n\n <mat-icon fxFlex=\"nogrow\" color=\"primary\" class=\"avatar-icon\">account_circle</mat-icon>\n\n </div>\n\n <div class=\"content\" fxLayout=\"column\" fxLayoutGap=\"32px\">\n\n <div fxLayout=\"column\">\n\n <mat-form-field class=\"email-input\">\n <mat-icon matPrefix inline>email</mat-icon>\n <mat-label i18n=\"user login email input label|The user email input label\">Email</mat-label>\n <input matInput\n i18n-placeholder\n placeholder=\"Enter your email address\"\n type=\"email\"\n fxFlex=\"nogrow\"\n formControlName=\"email\">\n <mat-error *rxapFormControlError=\"let error from 'email'; if: 'required'\" i18n=\"user login email input error required\">\n Email is <strong>required</strong>\n </mat-error>\n <mat-error *rxapFormControlError=\"let error from 'email'; if: 'email'\" i18n=\"user login email input error format\">\n Please enter a valid email address\n </mat-error>\n </mat-form-field>\n\n <mat-form-field class=\"password-input\">\n <mat-icon matPrefix inline>vpn_key</mat-icon>\n <mat-label i18n=\"user login password input label|The user password input label\">Password</mat-label>\n <input matInput\n type=\"password\"\n i18n-placeholder\n placeholder=\"Enter your password\"\n fxFlex=\"nogrow\"\n #passwordInput\n formControlName=\"password\">\n <mat-error *rxapFormControlError=\"let error from 'password'; if: 'required'\" i18n=\"user login password input error required\">\n Password is <strong>required</strong>\n </mat-error>\n <button tabIndex=\"-1\" matSuffix *ngIf=\"passwordInput.type === 'password'\" mat-icon-button type=\"button\" (click)=\"passwordInput.type = 'test'\">\n <mat-icon>visibility</mat-icon>\n </button>\n <button tabIndex=\"-1\" matSuffix *ngIf=\"passwordInput.type === 'text'\" mat-icon-button type=\"button\" (click)=\"passwordInput.type = 'password'\">\n <mat-icon>visibility_off</mat-icon>\n </button>\n </mat-form-field>\n\n </div>\n\n <div class=\"sub-controls\" fxLayout=\"row wrap\" fxLayoutAlign=\"space-between center\" fxLayoutGap=\"16px\">\n\n <mat-checkbox class=\"remember-input\" fxFlex=\"nogrow\" formControlName=\"remember\">Remember me</mat-checkbox>\n\n <div fxFlex=\"nogrow\"\n matTooltip=\"Please enter a valid email address\"\n matTooltipPosition=\"above\"\n [matTooltipDisabled]=\"form.control.controls.email.valid\">\n <button color=\"accent\"\n type=\"button\"\n mat-button\n i18n\n (click)=\"requestPasswordReset(form.value.email)\"\n [disabled]=\"!form.value.email || form.control.controls.email.hasError('email')\">\n <span fxLayout=\"row\" fxLayoutGap=\"8px\" fxLayoutAlign=\"space-between center\">\n <mat-progress-spinner *ngIf=\"requestingPasswordReset$ | async\" mode=\"indeterminate\" [diameter]=\"15\"></mat-progress-spinner>\n <span fxFlex=\"nogrow\">Password forgotten</span>\n </span>\n </button>\n </div>\n\n </div>\n\n <div fxFlex=\"nogrow\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n\n <div fxFlex=\"nogrow\">\n <button mat-raised-button color=\"primary\" type=\"submit\" rxapFormControlMarkDirty>Login</button>\n </div>\n\n </div>\n\n </div>\n\n <div *rxapFormSubmitFailed=\"let error\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <mat-error>{{ error.message }}</mat-error>\n </div>\n\n <mat-progress-bar *rxapFormSubmitting mode=\"indeterminate\" class=\"loading-bar\"></mat-progress-bar>\n\n</form>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LoginComponent } from './login.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MatInputModule } from '@angular/material/input';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { RxapFormsModule } from '@rxap/forms';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\n\n\n@NgModule({\n declarations: [ LoginComponent ],\n imports: [\n CommonModule,\n FlexLayoutModule,\n MatButtonModule,\n MatCardModule,\n MatSnackBarModule,\n MatProgressSpinnerModule,\n MatInputModule,\n ReactiveFormsModule,\n RxapFormsModule,\n MatCheckboxModule,\n MatIconModule,\n MatTooltipModule,\n MatProgressBarModule\n ],\n exports: [ LoginComponent ]\n})\nexport class LoginComponentModule {}\n","import { Component } from '@angular/core';\nimport { RouterOutlet } from '@angular/router';\nimport {\n style,\n trigger,\n transition,\n animate\n} from '@angular/animations';\n\n@Component({\n selector: 'rxap-authentication-container',\n templateUrl: './authentication-container.component.html',\n styleUrls: [ './authentication-container.component.scss' ],\n host: { class: 'rxap-authentication-container' },\n animations: [\n trigger('routeAnimations', [\n transition(\n ':enter',\n [\n style({ opacity: 0 }),\n animate('512ms', style({ opacity: 1 }))\n ]\n ),\n transition(\n ':leave',\n [\n style({ opacity: 1 }),\n animate('512ms', style({ opacity: 0 }))\n ]\n )\n ])\n ]\n})\nexport class AuthenticationContainerComponent {\n\n public prepareRoute(outlet: RouterOutlet) {\n return outlet.isActivated ? outlet.activatedRoute : 'true';\n }\n\n}\n","<div class=\"container\" [@routeAnimations]=\"prepareRoute(outlet)\">\n\n <div class=\"split mat-elevation-z3\"></div>\n\n <router-outlet #outlet=\"outlet\"></router-outlet>\n <ng-content></ng-content>\n\n</div>\n","import { NgModule } from '@angular/core';\nimport { AuthenticationContainerComponent } from './authentication-container.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { RouterModule } from '@angular/router';\nimport { MatToolbarModule } from '@angular/material/toolbar';\n\n@NgModule({\n declarations: [ AuthenticationContainerComponent ],\n exports: [ AuthenticationContainerComponent ],\n imports: [\n FlexLayoutModule,\n MatToolbarModule,\n RouterModule\n ]\n})\nexport class AuthenticationContainerComponentModule {}\n","import {\n Injectable,\n Provider,\n Injector,\n INJECTOR,\n Inject,\n} from '@angular/core';\nimport { RxapAuthenticationService } from '@rxap/authentication';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { map, switchMap, tap, take } from 'rxjs/operators';\nimport {\n UseFormControl,\n RxapFormBuilder,\n RXAP_FORM_DEFINITION_BUILDER,\n FormDefinition,\n RXAP_FORM_DEFINITION,\n RxapForm,\n RxapFormControl,\n RxapFormGroup,\n RXAP_FORM_SUBMIT_METHOD,\n FormSubmitMethod,\n ControlSetValue,\n ControlValidator,\n FormType,\n} from '@rxap/forms';\nimport { Validators } from '@angular/forms';\nimport { MatSnackBar } from '@angular/material/snack-bar';\n\nexport const RXAP_RESET_PASSWORD_FORM = 'rxap-reset-password';\n\n@Injectable()\nexport class ResetPasswordFormSubmitMethod implements FormSubmitMethod<any> {\n constructor(\n @Inject(ActivatedRoute)\n private readonly route: ActivatedRoute,\n @Inject(RxapAuthenticationService)\n private readonly authentication: RxapAuthenticationService,\n @Inject(MatSnackBar)\n private readonly snackBar: MatSnackBar,\n @Inject(Router)\n private readonly router: Router\n ) {}\n\n public call(value: { password: string }): boolean | Promise<boolean> {\n return this.route.params\n .pipe(\n take(1),\n map((params) => params.token),\n switchMap((token) =>\n this.authentication.sendPasswordReset(value.password, token)\n ),\n tap((result) => {\n if (result) {\n this.snackBar.open('Password reset was successful.', undefined, {\n duration: 3500,\n });\n return this.router.navigate(['/']);\n }\n return Promise.resolve();\n })\n )\n .toPromise();\n }\n}\n\nexport interface IResetPasswordForm {\n password: string;\n passwordRepeat: string;\n}\n\n@RxapForm({\n id: RXAP_RESET_PASSWORD_FORM,\n})\n@Injectable()\nexport class ResetPasswordForm implements FormType<IResetPasswordForm> {\n public rxapFormGroup!: RxapFormGroup;\n\n @UseFormControl({\n validators: [Validators.required],\n })\n public password!: RxapFormControl;\n\n @UseFormControl({\n validators: [Validators.required],\n })\n public passwordRepeat!: RxapFormControl;\n\n @ControlValidator('passwordRepeat')\n public passwordEqual() {\n if (this.password.value !== this.passwordRepeat.value) {\n return { equal: 'passwords are not equal' };\n }\n return null;\n }\n\n @ControlSetValue('password')\n public resetRepeat() {\n this.passwordRepeat.reset();\n }\n}\n\nexport const ResetPasswordFormProviders: Provider[] = [\n ResetPasswordForm,\n {\n provide: RXAP_FORM_DEFINITION_BUILDER,\n useFactory: (injector: Injector) =>\n new RxapFormBuilder<IResetPasswordForm>(ResetPasswordForm, injector),\n deps: [INJECTOR],\n },\n {\n provide: RXAP_FORM_DEFINITION,\n useFactory: (builder: RxapFormBuilder<IResetPasswordForm>) =>\n builder.build(),\n deps: [RXAP_FORM_DEFINITION_BUILDER],\n },\n {\n provide: RXAP_FORM_SUBMIT_METHOD,\n useClass: ResetPasswordFormSubmitMethod,\n },\n];\n","import {\n Component,\n ChangeDetectionStrategy\n} from '@angular/core';\nimport { ResetPasswordFormProviders } from './reset-password.form';\nimport {\n ErrorStateMatcher,\n ShowOnDirtyErrorStateMatcher\n} from '@angular/material/core';\nimport { fadeAnimation } from '../fade-animation';\n\n@Component({\n selector: 'rxap-reset-password',\n templateUrl: './reset-password.component.html',\n styleUrls: [ './reset-password.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n ResetPasswordFormProviders,\n {\n provide: ErrorStateMatcher,\n useClass: ShowOnDirtyErrorStateMatcher\n }\n ],\n animations: [\n fadeAnimation\n ]\n})\nexport class ResetPasswordComponent {}\n","<form rxapForm class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\" #form=\"rxapForm\" fxLayoutGap=\"32px\" novalidate\n [@fadeAnimation]=\"'in'\">\n\n <div class=\"header\" fxLayout=\"column\" fxLayoutAlign=\"center center\" fxFlex=\"nogrow\">\n\n <mat-icon fxFlex=\"nogrow\" color=\"primary\" class=\"avatar-icon\">vpn_key</mat-icon>\n\n </div>\n\n <div class=\"content\" fxLayout=\"column\" fxLayoutGap=\"32px\">\n\n <div fxLayout=\"column\">\n\n <mat-form-field class=\"password-input\">\n <mat-icon matPrefix inline>vpn_key</mat-icon>\n <mat-label i18n=\"user login password input label|The user password input label\">New password</mat-label>\n <input matInput\n type=\"password\"\n i18n-placeholder\n placeholder=\"Enter your new password\"\n fxFlex=\"nogrow\"\n #passwordInput\n formControlName=\"password\">\n <mat-error *rxapFormControlError=\"let error from 'password'; if: 'required'\" i18n=\"user login password input error required\">\n Password is <strong>required</strong>\n </mat-error>\n <button tabIndex=\"-1\" matSuffix *ngIf=\"passwordInput.type === 'password'\" mat-icon-button type=\"button\" (click)=\"passwordInput.type = 'test'\">\n <mat-icon>visibility</mat-icon>\n </button>\n <button tabIndex=\"-1\" matSuffix *ngIf=\"passwordInput.type === 'text'\" mat-icon-button type=\"button\" (click)=\"passwordInput.type = 'password'\">\n <mat-icon>visibility_off</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field class=\"password-input\">\n <mat-icon matPrefix inline>vpn_key</mat-icon>\n <mat-label i18n=\"user login password input label|The user password input label\">Repeat password</mat-label>\n <input matInput\n type=\"password\"\n i18n-placeholder\n placeholder=\"Enter your new password again\"\n fxFlex=\"nogrow\"\n #passwordRepeatInput\n formControlName=\"passwordRepeat\">\n <mat-error *rxapFormControlError=\"let error from 'passwordRepeat'; if: 'required'\" i18n=\"user login password input error required\">\n Password is <strong>required</strong>\n </mat-error>\n <mat-error *rxapFormControlError=\"let error from 'passwordRepeat'; if: 'equal'\" i18n=\"user login password input error submit\">\n Entered password are <strong>not equal</strong>\n </mat-error>\n <button tabIndex=\"-1\"\n matSuffix\n *ngIf=\"passwordRepeatInput.type === 'password'\"\n mat-icon-button\n type=\"button\"\n (click)=\"passwordRepeatInput.type = 'text'\">\n <mat-icon>visibility</mat-icon>\n </button>\n <button tabIndex=\"-1\"\n matSuffix\n *ngIf=\"passwordRepeatInput.type === 'text'\"\n mat-icon-button\n type=\"button\"\n (click)=\"passwordRepeatInput.type = 'password'\">\n <mat-icon>visibility_off</mat-icon>\n </button>\n </mat-form-field>\n\n </div>\n\n <div fxFlex=\"nogrow\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n\n <div fxFlex=\"nogrow\">\n <button mat-raised-button color=\"primary\" type=\"submit\" rxapFormControlMarkDirty>Reset password</button>\n </div>\n\n </div>\n\n </div>\n\n <div *rxapFormSubmitFailed=\"let error\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <mat-error>{{ error.message }}</mat-error>\n </div>\n\n <mat-progress-bar *rxapFormSubmitting mode=\"indeterminate\" class=\"loading-bar\"></mat-progress-bar>\n\n</form>\n","import { NgModule } from '@angular/core';\nimport { ResetPasswordComponent } from './reset-password.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { CommonModule } from '@angular/common';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatInputModule } from '@angular/material/input';\nimport { RxapFormsModule } from '@rxap/forms';\nimport { MatIconModule } from '@angular/material/icon';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\n\n\n@NgModule({\n declarations: [\n ResetPasswordComponent\n ],\n imports: [\n MatCardModule,\n FlexLayoutModule,\n MatButtonModule,\n CommonModule,\n MatProgressSpinnerModule,\n MatInputModule,\n RxapFormsModule,\n MatIconModule,\n ReactiveFormsModule,\n MatProgressBarModule,\n MatSnackBarModule,\n ],\n exports: [\n ResetPasswordComponent\n ]\n})\nexport class ResetPasswordComponentModule {}\n","import {\n Component,\n ChangeDetectionStrategy,\n OnInit,\n OnDestroy,\n Inject,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { RxapAuthenticationService } from '@rxap/authentication';\nimport { filter, tap } from 'rxjs/operators';\nimport { Router } from '@angular/router';\n\n@Component({\n selector: 'rxap-auth-loading',\n templateUrl: './loading.component.html',\n styleUrls: ['./loading.component.scss'],\n host: { class: 'rxap-auth-loading' },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LoadingComponent implements OnInit, OnDestroy {\n public subscription?: Subscription;\n\n constructor(\n @Inject(RxapAuthenticationService)\n public readonly authentication: RxapAuthenticationService,\n @Inject(Router)\n public readonly router: Router\n ) {}\n\n public ngOnInit(): void {\n // TODO : remove the concept of isAuthenticated$\n if (this.authentication.isAuthenticated$) {\n this.subscription = this.authentication.isAuthenticated$\n .pipe(\n filter((isAuthenticated) => isAuthenticated !== null),\n tap(() => this.router.navigate(['/', 'authentication', 'login']))\n )\n .subscribe();\n }\n }\n\n public ngOnDestroy(): void {\n this.subscription?.unsubscribe();\n }\n}\n","<mat-progress-bar class=\"loading-bar\" mode=\"indeterminate\"></mat-progress-bar>\n","import { NgModule } from '@angular/core';\nimport { LoadingComponent } from './loading.component';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\n\n\n@NgModule({\n declarations: [\n LoadingComponent\n ],\n imports: [\n MatProgressBarModule\n ],\n exports: [\n LoadingComponent\n ]\n})\nexport class LoadingComponentModule {}\n","import { NgModule } from '@angular/core';\nimport { LoginComponentModule } from './login/login.component.module';\nimport { AuthenticationContainerComponentModule } from './authentication-container/authentication-container.component.module';\nimport { ResetPasswordComponentModule } from './reset-password/reset-password.component.module';\nimport { LoadingComponentModule } from './loading/loading.component.module';\n\n@NgModule({\n exports: [\n LoginComponentModule,\n AuthenticationContainerComponentModule,\n ResetPasswordComponentModule,\n LoadingComponentModule\n ]\n})\nexport class RxapAuthenticationModule {}\n","import { Routes } from '@angular/router';\nimport { LoginComponent } from './login/login.component';\nimport { AuthenticationContainerComponent } from './authentication-container/authentication-container.component';\nimport { ResetPasswordComponent } from './reset-password/reset-password.component';\nimport { LoadingComponent } from './loading/loading.component';\nimport { RxapAuthenticationGuard } from '@rxap/authentication';\n\nexport const AuthenticationRoutes: Routes = [\n {\n path: 'authentication',\n component: AuthenticationContainerComponent,\n children: [\n {\n canActivate: [ RxapAuthenticationGuard ],\n path: 'login',\n component: LoginComponent\n },\n {\n canActivate: [ RxapAuthenticationGuard ],\n path: 'reset-password/:token',\n component: ResetPasswordComponent\n },\n {\n path: 'loading',\n component: LoadingComponent\n },\n {\n path: '**',\n redirectTo: 'login'\n }\n ]\n }\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2Ca,SAAS,SAAT,SAAS;IAqBpB,YAA4B,MAA0B;QAA1B,WAAM,GAAN,MAAM,CAAoB;QAlB/C,YAAO,GAAG,IAAI,CAAC;QACf,gBAAW,GAAG,KAAK,CAAC;KAiB+B;IAEnD,UAAU;QACf,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAS,8BAA8B,CAAC,CAAC;QACtE,IAAI,KAAK,EAAE;YACT,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;SAC5B;QACD,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAS,iCAAiC,CAAC,CAAC;QAC5E,IAAI,QAAQ,EAAE;YACZ,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;SAClC;KACF;EACF;sGAjCY,SAAS;0GAAT,SAAS;AASpB;IAHC,cAAc,CAAC;QACd,UAAU,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC;KACpD,CAAC;8BACa,eAAe;wCAAS;AAKvC;IAHC,cAAc,CAAC;QACd,UAAU,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;KAClC,CAAC;8BACgB,eAAe;2CAAC;A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;YACD;gBACE,IAAI,EAAQ,IAAI;gBAChB,UAAU,EAAE,OAAO;aACpB;SACF;KACF;;;AC/BH;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"rxap-authentication.js","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} 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\n@Injectable({ providedIn: 'root' })\n/* ignore coverage */\nexport class RxapAuthenticationService implements IAuthenticationService {\n\n public isAuthenticated$ = new BehaviorSubject<boolean | null>(null);\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 } else {\n localStorage.removeItem(RXAP_AUTHENTICATION_LOCAL_STORAGE_KEY);\n reject(new Error('Login credentials are invalid'));\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 }\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.warn('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) {\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":";;;;;;;;MAaa,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;AAGD;M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