@daffodil/auth 0.91.0 → 0.92.3-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/driver/magento/index.d.ts +2 -2
- package/fesm2022/daffodil-auth-driver-in-memory.mjs +19 -19
- package/fesm2022/daffodil-auth-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-auth-driver-magento.mjs +24 -24
- package/fesm2022/daffodil-auth-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-auth-driver-testing.mjs +16 -16
- package/fesm2022/daffodil-auth-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-auth-driver.mjs +3 -3
- package/fesm2022/daffodil-auth-driver.mjs.map +1 -1
- package/fesm2022/daffodil-auth-routing.mjs +38 -35
- package/fesm2022/daffodil-auth-routing.mjs.map +1 -1
- package/fesm2022/daffodil-auth-state-testing.mjs +16 -16
- package/fesm2022/daffodil-auth-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-auth-state.mjs +42 -60
- package/fesm2022/daffodil-auth-state.mjs.map +1 -1
- package/fesm2022/daffodil-auth-testing.mjs +11 -11
- package/fesm2022/daffodil-auth-testing.mjs.map +1 -1
- package/fesm2022/daffodil-auth.mjs +3 -3
- package/fesm2022/daffodil-auth.mjs.map +1 -1
- package/package.json +1 -1
- package/routing/index.d.ts +24 -15
|
@@ -8,8 +8,8 @@ class MockAccountRegistration {
|
|
|
8
8
|
this.email = faker.internet.email();
|
|
9
9
|
this.password = faker.string.alphanumeric(16);
|
|
10
10
|
this.subscribe = faker.datatype.boolean();
|
|
11
|
-
this.firstName = faker.
|
|
12
|
-
this.lastName = faker.
|
|
11
|
+
this.firstName = faker.person.firstName();
|
|
12
|
+
this.lastName = faker.person.lastName();
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
;
|
|
@@ -17,10 +17,10 @@ class DaffAccountRegistrationFactory extends DaffModelFactory {
|
|
|
17
17
|
constructor() {
|
|
18
18
|
super(MockAccountRegistration);
|
|
19
19
|
}
|
|
20
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
21
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
20
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffAccountRegistrationFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
21
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffAccountRegistrationFactory, providedIn: 'root' }); }
|
|
22
22
|
}
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffAccountRegistrationFactory, decorators: [{
|
|
24
24
|
type: Injectable,
|
|
25
25
|
args: [{
|
|
26
26
|
providedIn: 'root',
|
|
@@ -37,10 +37,10 @@ class DaffAuthTokenFactory extends DaffModelFactory {
|
|
|
37
37
|
constructor() {
|
|
38
38
|
super(MockAuthToken);
|
|
39
39
|
}
|
|
40
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
41
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
40
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffAuthTokenFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
41
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffAuthTokenFactory, providedIn: 'root' }); }
|
|
42
42
|
}
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffAuthTokenFactory, decorators: [{
|
|
44
44
|
type: Injectable,
|
|
45
45
|
args: [{
|
|
46
46
|
providedIn: 'root',
|
|
@@ -59,10 +59,10 @@ class DaffAuthResetPasswordInfoFactory extends DaffModelFactory {
|
|
|
59
59
|
constructor() {
|
|
60
60
|
super(MockAuthResetPasswordInfo);
|
|
61
61
|
}
|
|
62
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
63
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
62
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffAuthResetPasswordInfoFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
63
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffAuthResetPasswordInfoFactory, providedIn: 'root' }); }
|
|
64
64
|
}
|
|
65
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffAuthResetPasswordInfoFactory, decorators: [{
|
|
66
66
|
type: Injectable,
|
|
67
67
|
args: [{
|
|
68
68
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-auth-testing.mjs","sources":["../../../libs/auth/testing/src/factories/account-registration.factory.ts","../../../libs/auth/testing/src/factories/auth-token.factory.ts","../../../libs/auth/testing/src/factories/reset-password-info.factory.ts","../../../libs/auth/testing/src/daffodil-auth-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\nimport { DaffModelFactory } from '@daffodil/core/testing';\n\nexport class MockAccountRegistration implements DaffAccountRegistration {\n email = faker.internet.email();\n password = faker.string.alphanumeric(16);\n subscribe = faker.datatype.boolean();\n firstName = faker.
|
|
1
|
+
{"version":3,"file":"daffodil-auth-testing.mjs","sources":["../../../libs/auth/testing/src/factories/account-registration.factory.ts","../../../libs/auth/testing/src/factories/auth-token.factory.ts","../../../libs/auth/testing/src/factories/reset-password-info.factory.ts","../../../libs/auth/testing/src/daffodil-auth-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\nimport { DaffModelFactory } from '@daffodil/core/testing';\n\nexport class MockAccountRegistration implements DaffAccountRegistration {\n email = faker.internet.email();\n password = faker.string.alphanumeric(16);\n subscribe = faker.datatype.boolean();\n firstName = faker.person.firstName();\n lastName = faker.person.lastName();\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAccountRegistrationFactory extends DaffModelFactory<DaffAccountRegistration> {\n constructor() {\n super(MockAccountRegistration);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffAuthToken } from '@daffodil/auth';\nimport { DaffModelFactory } from '@daffodil/core/testing';\n\nexport class MockAuthToken implements DaffAuthToken {\n token = faker.string.alphanumeric(16);\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthTokenFactory extends DaffModelFactory<DaffAuthToken> {\n constructor() {\n super(MockAuthToken);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffModelFactory } from '@daffodil/core/testing';\n\nexport class MockAuthResetPasswordInfo implements DaffAuthResetPasswordInfo {\n email = faker.internet.email();\n password = faker.string.alphanumeric(16);\n token = faker.string.alphanumeric(16);\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthResetPasswordInfoFactory extends DaffModelFactory<DaffAuthResetPasswordInfo> {\n constructor() {\n super(MockAuthResetPasswordInfo);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
|
|
@@ -16,10 +16,10 @@ class DaffAuthStorageService {
|
|
|
16
16
|
removeAuthToken() {
|
|
17
17
|
this.storageService.removeItem(this.AUTH_STORAGE_TOKEN);
|
|
18
18
|
}
|
|
19
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
20
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
19
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffAuthStorageService, deps: [{ token: DaffPersistenceServiceToken }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
20
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffAuthStorageService, providedIn: 'root' }); }
|
|
21
21
|
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffAuthStorageService, decorators: [{
|
|
23
23
|
type: Injectable,
|
|
24
24
|
args: [{
|
|
25
25
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-auth.mjs","sources":["../../../libs/auth/src/storage/auth-storage.service.ts","../../../libs/auth/src/errors/codes.enum.ts","../../../libs/auth/src/errors/missing-token.ts","../../../libs/auth/src/errors/map.ts","../../../libs/auth/src/daffodil-auth.ts"],"sourcesContent":["import {\n Injectable,\n Inject,\n} from '@angular/core';\n\nimport {\n DaffPersistenceService,\n DaffPersistenceServiceToken,\n} from '@daffodil/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthStorageService {\n private readonly AUTH_STORAGE_TOKEN = 'DAFF_AUTH_TOKEN';\n\n constructor(@Inject(DaffPersistenceServiceToken) private storageService: DaffPersistenceService) {}\n\n getAuthToken(): string {\n return this.storageService.getItem(this.AUTH_STORAGE_TOKEN);\n }\n\n setAuthToken(value: string): void {\n this.storageService.setItem(this.AUTH_STORAGE_TOKEN, value);\n }\n\n removeAuthToken(): void {\n this.storageService.removeItem(this.AUTH_STORAGE_TOKEN);\n }\n}\n","export enum DaffAuthErrorCodes {\n MISSING_TOKEN = 'DAFF_AUTH_MISSING_TOKEN',\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffAuthErrorCodes } from './codes.enum';\n\n/**\n * An error thrown when an authenticated action was initiated\n * but an auth token was not present.\n */\nexport class DaffAuthMissingTokenError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffAuthErrorCodes.MISSING_TOKEN;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import { DaffAuthErrorCodes } from './codes.enum';\nimport { DaffAuthMissingTokenError } from './missing-token';\n\n/**\n * A mapping from error codes to error class constructors.\n */\nexport const DaffAuthErrorMap = {\n [DaffAuthErrorCodes.MISSING_TOKEN]: DaffAuthMissingTokenError,\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAaa,sBAAsB,CAAA;AAGjC,IAAA,WAAA,CAAyD,cAAsC,EAAA;QAAtC,IAAA,CAAA,cAAc,GAAd,cAAc;QAFtD,IAAA,CAAA,kBAAkB,GAAG,iBAAiB;IAE2C;IAElG,YAAY,GAAA;QACV,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC;IAC7D;AAEA,IAAA,YAAY,CAAC,KAAa,EAAA;QACxB,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,KAAK,CAAC;IAC7D;IAEA,eAAe,GAAA;QACb,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,kBAAkB,CAAC;IACzD;AAfW,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,
|
|
1
|
+
{"version":3,"file":"daffodil-auth.mjs","sources":["../../../libs/auth/src/storage/auth-storage.service.ts","../../../libs/auth/src/errors/codes.enum.ts","../../../libs/auth/src/errors/missing-token.ts","../../../libs/auth/src/errors/map.ts","../../../libs/auth/src/daffodil-auth.ts"],"sourcesContent":["import {\n Injectable,\n Inject,\n} from '@angular/core';\n\nimport {\n DaffPersistenceService,\n DaffPersistenceServiceToken,\n} from '@daffodil/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthStorageService {\n private readonly AUTH_STORAGE_TOKEN = 'DAFF_AUTH_TOKEN';\n\n constructor(@Inject(DaffPersistenceServiceToken) private storageService: DaffPersistenceService) {}\n\n getAuthToken(): string {\n return this.storageService.getItem(this.AUTH_STORAGE_TOKEN);\n }\n\n setAuthToken(value: string): void {\n this.storageService.setItem(this.AUTH_STORAGE_TOKEN, value);\n }\n\n removeAuthToken(): void {\n this.storageService.removeItem(this.AUTH_STORAGE_TOKEN);\n }\n}\n","export enum DaffAuthErrorCodes {\n MISSING_TOKEN = 'DAFF_AUTH_MISSING_TOKEN',\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffAuthErrorCodes } from './codes.enum';\n\n/**\n * An error thrown when an authenticated action was initiated\n * but an auth token was not present.\n */\nexport class DaffAuthMissingTokenError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffAuthErrorCodes.MISSING_TOKEN;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import { DaffAuthErrorCodes } from './codes.enum';\nimport { DaffAuthMissingTokenError } from './missing-token';\n\n/**\n * A mapping from error codes to error class constructors.\n */\nexport const DaffAuthErrorMap = {\n [DaffAuthErrorCodes.MISSING_TOKEN]: DaffAuthMissingTokenError,\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAaa,sBAAsB,CAAA;AAGjC,IAAA,WAAA,CAAyD,cAAsC,EAAA;QAAtC,IAAA,CAAA,cAAc,GAAd,cAAc;QAFtD,IAAA,CAAA,kBAAkB,GAAG,iBAAiB;IAE2C;IAElG,YAAY,GAAA;QACV,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC;IAC7D;AAEA,IAAA,YAAY,CAAC,KAAa,EAAA;QACxB,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,KAAK,CAAC;IAC7D;IAEA,eAAe,GAAA;QACb,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,kBAAkB,CAAC;IACzD;AAfW,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,kBAGb,2BAA2B,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAHpC,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cAFrB,MAAM,EAAA,CAAA,CAAA;;4FAEP,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;0BAIc,MAAM;2BAAC,2BAA2B;;;IChBrC;AAAZ,CAAA,UAAY,kBAAkB,EAAA;AAC5B,IAAA,kBAAA,CAAA,eAAA,CAAA,GAAA,yBAAyC;AAC3C,CAAC,EAFW,kBAAkB,KAAlB,kBAAkB,GAAA,EAAA,CAAA,CAAA;;ACO9B;;;AAGG;AACG,MAAO,yBAA0B,SAAQ,oBAAoB,CAAA;AAGjE,IAAA,WAAA,CAAmB,OAAe,EAAA;QAChC,KAAK,CAAC,OAAO,CAAC;QADG,IAAA,CAAA,OAAO,GAAP,OAAO;AAFV,QAAA,IAAA,CAAA,IAAI,GAAW,kBAAkB,CAAC,aAAa;IAI/D;AACD;;ACdD;;AAEG;AACI,MAAM,gBAAgB,GAAG;AAC9B,IAAA,CAAC,kBAAkB,CAAC,aAAa,GAAG,yBAAyB;;;ACP/D;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@daffodil/auth","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/auth"]}}},"version":"0.
|
|
1
|
+
{"name":"@daffodil/auth","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/auth"]}}},"version":"0.92.3-rc.0","description":"Platform-agnostic models, state management, and drivers for user authentication and access token management. Part of the Daffodil ecommerce framework.","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"publishConfig":{"directory":"../../dist/auth"},"homepage":"https://github.com/graycoreio/daffodil","peerDependencies":{"@angular/common":"^20.0.0","@angular/core":"^20.0.0","@daffodil/core":"0.92.3-rc.0","@ngrx/store":"^20.0.0","rxjs":"^7.0.0"},"optionalDependencies":{"@daffodil/driver":"0.92.3-rc.0"},"module":"fesm2022/daffodil-auth.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","default":"./fesm2022/daffodil-auth.mjs"},"./driver":{"types":"./driver/index.d.ts","default":"./fesm2022/daffodil-auth-driver.mjs"},"./routing":{"types":"./routing/index.d.ts","default":"./fesm2022/daffodil-auth-routing.mjs"},"./state":{"types":"./state/index.d.ts","default":"./fesm2022/daffodil-auth-state.mjs"},"./testing":{"types":"./testing/index.d.ts","default":"./fesm2022/daffodil-auth-testing.mjs"},"./driver/in-memory":{"types":"./driver/in-memory/index.d.ts","default":"./fesm2022/daffodil-auth-driver-in-memory.mjs"},"./driver/magento":{"types":"./driver/magento/index.d.ts","default":"./fesm2022/daffodil-auth-driver-magento.mjs"},"./driver/testing":{"types":"./driver/testing/index.d.ts","default":"./fesm2022/daffodil-auth-driver-testing.mjs"},"./state/testing":{"types":"./state/testing/index.d.ts","default":"./fesm2022/daffodil-auth-state-testing.mjs"}},"sideEffects":false,"dependencies":{"tslib":"^2.6.2"}}
|
package/routing/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Router, ActivatedRouteSnapshot, ActivatedRoute } from '@angular/router';
|
|
1
|
+
import { Router, CanActivate, ActivatedRouteSnapshot, UrlTree, ActivatedRoute } from '@angular/router';
|
|
2
2
|
import { Store } from '@ngrx/store';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { DaffAuthStorageService } from '@daffodil/auth';
|
|
@@ -6,6 +6,7 @@ import { DaffAuthDriverTokenCheck } from '@daffodil/auth/driver';
|
|
|
6
6
|
import { ErrorTransformer } from '@daffodil/core/state';
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
8
|
import { ModuleWithProviders } from '@angular/core';
|
|
9
|
+
import * as _daffodil_auth_routing from '@daffodil/auth/routing';
|
|
9
10
|
import { DaffAuthFacade, DaffAuthUnauthenticatedHook } from '@daffodil/auth/state';
|
|
10
11
|
import * as i1 from '@ngrx/effects';
|
|
11
12
|
|
|
@@ -37,6 +38,22 @@ declare class GuestOnlyGuard {
|
|
|
37
38
|
static ɵprov: i0.ɵɵInjectableDeclaration<GuestOnlyGuard>;
|
|
38
39
|
}
|
|
39
40
|
|
|
41
|
+
declare class DaffAuthResetPasswordGuard implements CanActivate {
|
|
42
|
+
readonly facade: DaffAuthFacade;
|
|
43
|
+
readonly config: _daffodil_auth_routing.DaffAuthRoutingConfig;
|
|
44
|
+
readonly platformId: Object;
|
|
45
|
+
readonly router: Router;
|
|
46
|
+
canActivate(route: ActivatedRouteSnapshot): boolean | UrlTree;
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthResetPasswordGuard, never>;
|
|
48
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffAuthResetPasswordGuard>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
declare const DaffAuthGuestOnlyGuardRedirectUrl: i0.InjectionToken<string>;
|
|
52
|
+
declare const provideDaffAuthGuestOnlyGuardRedirectUrl: <R extends string = string>(value: R) => i0.ValueProvider;
|
|
53
|
+
|
|
54
|
+
declare const DaffAuthMemberOnlyGuardRedirectUrl: i0.InjectionToken<string>;
|
|
55
|
+
declare const provideDaffAuthMemberOnlyGuardRedirectUrl: <R extends string = string>(value: R) => i0.ValueProvider;
|
|
56
|
+
|
|
40
57
|
/**
|
|
41
58
|
* An interface for providing `@daffodil/auth/routing` with necessary config values.
|
|
42
59
|
*/
|
|
@@ -65,6 +82,11 @@ interface DaffAuthRoutingConfig {
|
|
|
65
82
|
* Defaults to `'/'`.
|
|
66
83
|
*/
|
|
67
84
|
tokenExpirationRedirectPath: string;
|
|
85
|
+
/**
|
|
86
|
+
* The path to which the user will be redirected when the reset password guard blocks activation.
|
|
87
|
+
* Defaults to `'/'`.
|
|
88
|
+
*/
|
|
89
|
+
resetPasswordRedirectPath: string;
|
|
68
90
|
}
|
|
69
91
|
|
|
70
92
|
declare const DAFF_AUTH_ROUTING_CONFIG_DEFAULT: DaffAuthRoutingConfig;
|
|
@@ -72,19 +94,6 @@ declare const DAFF_AUTH_ROUTING_CONFIG_DEFAULT: DaffAuthRoutingConfig;
|
|
|
72
94
|
declare const DAFF_AUTH_ROUTING_CONFIG: i0.InjectionToken<DaffAuthRoutingConfig>;
|
|
73
95
|
declare const provideDaffAuthRoutingConfig: <R extends DaffAuthRoutingConfig = DaffAuthRoutingConfig>(config: Partial<R> | i0.InjectionToken<Partial<R>>) => i0.FactoryProvider;
|
|
74
96
|
|
|
75
|
-
declare class DaffAuthResetPasswordGuard {
|
|
76
|
-
private facade;
|
|
77
|
-
private config;
|
|
78
|
-
constructor(facade: DaffAuthFacade, config: DaffAuthRoutingConfig);
|
|
79
|
-
canActivate(route: ActivatedRouteSnapshot): Observable<boolean>;
|
|
80
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthResetPasswordGuard, never>;
|
|
81
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffAuthResetPasswordGuard>;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
declare const DaffAuthGuestOnlyGuardRedirectUrl: i0.InjectionToken<string>;
|
|
85
|
-
|
|
86
|
-
declare const DaffAuthMemberOnlyGuardRedirectUrl: i0.InjectionToken<string>;
|
|
87
|
-
|
|
88
97
|
declare function daffAuthRoutingRedirectUnauthenticatedHookFactory(router: Router, route: ActivatedRoute, config: DaffAuthRoutingConfig): DaffAuthUnauthenticatedHook;
|
|
89
98
|
|
|
90
99
|
declare class DaffAuthRoutingModule {
|
|
@@ -100,5 +109,5 @@ declare class DaffAuthRoutingRedirectModule {
|
|
|
100
109
|
static ɵinj: i0.ɵɵInjectorDeclaration<DaffAuthRoutingRedirectModule>;
|
|
101
110
|
}
|
|
102
111
|
|
|
103
|
-
export { DAFF_AUTH_ROUTING_CONFIG, DAFF_AUTH_ROUTING_CONFIG_DEFAULT, DaffAuthGuestOnlyGuardRedirectUrl, DaffAuthMemberOnlyGuardRedirectUrl, DaffAuthResetPasswordGuard, DaffAuthRoutingModule, DaffAuthRoutingRedirectModule, GuestOnlyGuard, MemberOnlyGuard, daffAuthRoutingRedirectUnauthenticatedHookFactory, provideDaffAuthRoutingConfig };
|
|
112
|
+
export { DAFF_AUTH_ROUTING_CONFIG, DAFF_AUTH_ROUTING_CONFIG_DEFAULT, DaffAuthGuestOnlyGuardRedirectUrl, DaffAuthMemberOnlyGuardRedirectUrl, DaffAuthResetPasswordGuard, DaffAuthRoutingModule, DaffAuthRoutingRedirectModule, GuestOnlyGuard, MemberOnlyGuard, daffAuthRoutingRedirectUnauthenticatedHookFactory, provideDaffAuthGuestOnlyGuardRedirectUrl, provideDaffAuthMemberOnlyGuardRedirectUrl, provideDaffAuthRoutingConfig };
|
|
104
113
|
export type { DaffAuthRoutingConfig };
|