@daffodil/auth 0.66.1 → 0.67.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/{esm2020 → esm2022}/driver/in-memory/backend/auth.service.mjs +4 -4
- package/{esm2020 → esm2022}/driver/in-memory/drivers/auth/auth.service.mjs +5 -5
- package/{esm2020 → esm2022}/driver/in-memory/drivers/auth-driver.module.mjs +5 -5
- package/{esm2020 → esm2022}/driver/in-memory/drivers/login/login.service.mjs +5 -5
- package/{esm2020 → esm2022}/driver/in-memory/drivers/register/register.service.mjs +5 -5
- package/{esm2020 → esm2022}/driver/in-memory/drivers/reset-password/service.mjs +5 -5
- package/{esm2020 → esm2022}/driver/magento/apollo-bearer-token-link-generator.mjs +5 -5
- package/{esm2020 → esm2022}/driver/magento/auth-driver.module.mjs +5 -5
- package/{esm2020 → esm2022}/driver/magento/auth.service.mjs +5 -5
- package/{esm2020 → esm2022}/driver/magento/login.service.mjs +5 -5
- package/{esm2020 → esm2022}/driver/magento/register.service.mjs +5 -5
- package/{esm2020 → esm2022}/driver/magento/reset-password.service.mjs +5 -5
- package/{esm2020 → esm2022}/driver/magento/transforms/auth-transformer.service.mjs +4 -4
- package/{esm2020 → esm2022}/driver/services/auth-check.service.mjs +6 -6
- package/{esm2020 → esm2022}/driver/testing/drivers/auth/auth.service.mjs +4 -4
- package/{esm2020 → esm2022}/driver/testing/drivers/auth-driver.module.mjs +5 -5
- package/{esm2020 → esm2022}/driver/testing/drivers/login/login.service.mjs +5 -5
- package/{esm2020 → esm2022}/driver/testing/drivers/register/register.service.mjs +5 -5
- package/{esm2020 → esm2022}/driver/testing/drivers/reset-password/service.mjs +5 -5
- package/{esm2020 → esm2022}/routing/effects/redirect.effects.mjs +6 -6
- package/{esm2020 → esm2022}/routing/guards/guest-only.guard.mjs +7 -7
- package/{esm2020 → esm2022}/routing/guards/member-only.guard.mjs +7 -7
- package/{esm2020 → esm2022}/routing/guards/reset-password.guard.mjs +6 -6
- package/{esm2020 → esm2022}/routing/module.mjs +9 -9
- package/esm2022/routing/redirect.module.mjs +40 -0
- package/esm2022/state/auth-state.module.mjs +88 -0
- package/{esm2020 → esm2022}/state/effects/auth.effects.mjs +6 -6
- package/{esm2020 → esm2022}/state/effects/login.effects.mjs +6 -6
- package/{esm2020 → esm2022}/state/effects/register.effects.mjs +6 -6
- package/{esm2020 → esm2022}/state/effects/reset-password.effects.mjs +6 -6
- package/{esm2020 → esm2022}/state/facades/auth/facade.mjs +5 -5
- package/{esm2020 → esm2022}/state/facades/login/facade.mjs +5 -5
- package/{esm2020 → esm2022}/state/facades/register/facade.mjs +5 -5
- package/{esm2020 → esm2022}/state/facades/reset-password/facade.mjs +5 -5
- package/{esm2020 → esm2022}/state/testing/auth-testing.module.mjs +10 -10
- package/{esm2020 → esm2022}/state/testing/mock-auth-facade.mjs +4 -4
- package/{esm2020 → esm2022}/state/testing/mock-login-facade.mjs +4 -4
- package/{esm2020 → esm2022}/state/testing/mock-register-facade.mjs +4 -4
- package/{esm2020 → esm2022}/state/testing/mock-reset-password-facade.mjs +4 -4
- package/{esm2020 → esm2022}/storage/auth-storage.service.mjs +6 -6
- package/{esm2020 → esm2022}/testing/factories/account-registration.factory.mjs +5 -5
- package/{esm2020 → esm2022}/testing/factories/auth-token.factory.mjs +5 -5
- package/{esm2020 → esm2022}/testing/factories/reset-password-info.factory.mjs +5 -5
- package/{fesm2020 → fesm2022}/daffodil-auth-driver-in-memory.mjs +23 -23
- package/{fesm2020 → fesm2022}/daffodil-auth-driver-in-memory.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/daffodil-auth-driver-magento.mjs +27 -27
- package/{fesm2020 → fesm2022}/daffodil-auth-driver-magento.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/daffodil-auth-driver-testing.mjs +19 -19
- package/{fesm2020 → fesm2022}/daffodil-auth-driver-testing.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/daffodil-auth-driver.mjs +5 -5
- package/{fesm2020 → fesm2022}/daffodil-auth-driver.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/daffodil-auth-routing.mjs +40 -40
- package/fesm2022/daffodil-auth-routing.mjs.map +1 -0
- package/fesm2022/daffodil-auth-state-testing.mjs +107 -0
- package/{fesm2020 → fesm2022}/daffodil-auth-state-testing.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/daffodil-auth-state.mjs +64 -64
- package/{fesm2020 → fesm2022}/daffodil-auth-state.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/daffodil-auth-testing.mjs +12 -12
- package/{fesm2020 → fesm2022}/daffodil-auth-testing.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/daffodil-auth.mjs +5 -5
- package/{fesm2020 → fesm2022}/daffodil-auth.mjs.map +1 -1
- package/package.json +1 -1
- package/routing/guards/guest-only.guard.d.ts +2 -2
- package/routing/guards/member-only.guard.d.ts +2 -2
- package/routing/guards/reset-password.guard.d.ts +2 -2
- package/state/actions/auth.actions.d.ts +1 -1
- package/state/actions/login.actions.d.ts +1 -1
- package/state/actions/register.actions.d.ts +1 -1
- package/state/actions/reset-password.actions.d.ts +1 -1
- package/state/injection-tokens/unauthenticated/hook.type.d.ts +1 -1
- package/state/reducers/login/login-reducer-state.interface.d.ts +1 -1
- package/state/reducers/register/register-reducer-state.interface.d.ts +1 -1
- package/esm2020/routing/redirect.module.mjs +0 -40
- package/esm2020/state/auth-state.module.mjs +0 -88
- package/fesm2015/daffodil-auth-driver-in-memory.mjs +0 -256
- package/fesm2015/daffodil-auth-driver-in-memory.mjs.map +0 -1
- package/fesm2015/daffodil-auth-driver-magento.mjs +0 -372
- package/fesm2015/daffodil-auth-driver-magento.mjs.map +0 -1
- package/fesm2015/daffodil-auth-driver-testing.mjs +0 -139
- package/fesm2015/daffodil-auth-driver-testing.mjs.map +0 -1
- package/fesm2015/daffodil-auth-driver.mjs +0 -119
- package/fesm2015/daffodil-auth-driver.mjs.map +0 -1
- package/fesm2015/daffodil-auth-routing.mjs +0 -262
- package/fesm2015/daffodil-auth-routing.mjs.map +0 -1
- package/fesm2015/daffodil-auth-state-testing.mjs +0 -107
- package/fesm2015/daffodil-auth-state-testing.mjs.map +0 -1
- package/fesm2015/daffodil-auth-state.mjs +0 -853
- package/fesm2015/daffodil-auth-state.mjs.map +0 -1
- package/fesm2015/daffodil-auth-testing.mjs +0 -77
- package/fesm2015/daffodil-auth-testing.mjs.map +0 -1
- package/fesm2015/daffodil-auth.mjs +0 -63
- package/fesm2015/daffodil-auth.mjs.map +0 -1
- package/fesm2020/daffodil-auth-routing.mjs.map +0 -1
- package/fesm2020/daffodil-auth-state-testing.mjs +0 -107
- /package/{esm2020 → esm2022}/daffodil-auth.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/constants/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/constants/unauthenticated-error-codes.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/daffodil-auth-driver.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/errors/authentication-failed.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/errors/codes.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/errors/invalid-api-response.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/errors/map.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/errors/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/errors/registration-failed.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/errors/unauthorized.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/in-memory/daffodil-auth-driver-in-memory.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/in-memory/drivers/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/in-memory/index.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/in-memory/models/db-customer.type.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/in-memory/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/index.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/interfaces/auth-service.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/interfaces/login-service.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/interfaces/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/interfaces/register-service.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/interfaces/reset-password-service.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/daffodil-auth-driver-magento.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/errors/codes.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/errors/map.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/errors/transform.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/index.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/models/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/models/response/auth.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/models/response/register.type.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/models/response/reset-password.type.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/models/response/send-reset-email.type.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/queries/check-token.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/queries/create-customer.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/queries/generate-token.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/queries/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/queries/reset-password.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/queries/responses/check-token-response.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/queries/responses/generate-token-response.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/queries/responses/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/queries/responses/revoke-customer-token-response.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/queries/revoke-customer-token.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/queries/send-reset-email.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/validators/check-token.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/validators/generate-token.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/validators/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/validators/reset-password.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/validators/revoke-token.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/magento/validators/send-reset-email.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/services/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/testing/daffodil-auth-driver-testing.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/testing/drivers/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/testing/index.mjs +0 -0
- /package/{esm2020 → esm2022}/driver/testing/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/errors/codes.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/errors/map.mjs +0 -0
- /package/{esm2020 → esm2022}/errors/missing-token.mjs +0 -0
- /package/{esm2020 → esm2022}/errors/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/models/account-registration.mjs +0 -0
- /package/{esm2020 → esm2022}/models/auth-token.mjs +0 -0
- /package/{esm2020 → esm2022}/models/login-info.mjs +0 -0
- /package/{esm2020 → esm2022}/models/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/models/reset-password-info.type.mjs +0 -0
- /package/{esm2020 → esm2022}/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/routing/config/default.mjs +0 -0
- /package/{esm2020 → esm2022}/routing/config/interface.mjs +0 -0
- /package/{esm2020 → esm2022}/routing/config/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/routing/config/token.mjs +0 -0
- /package/{esm2020 → esm2022}/routing/daffodil-auth-routing.mjs +0 -0
- /package/{esm2020 → esm2022}/routing/guards/guest-only-guard-redirect.token.mjs +0 -0
- /package/{esm2020 → esm2022}/routing/guards/member-only-guard-redirect.token.mjs +0 -0
- /package/{esm2020 → esm2022}/routing/guards/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/routing/helpers/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/routing/helpers/redirect-unauthenticated-hook-factory.mjs +0 -0
- /package/{esm2020 → esm2022}/routing/index.mjs +0 -0
- /package/{esm2020 → esm2022}/routing/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/state/actions/auth.actions.mjs +0 -0
- /package/{esm2020 → esm2022}/state/actions/login.actions.mjs +0 -0
- /package/{esm2020 → esm2022}/state/actions/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/state/actions/register.actions.mjs +0 -0
- /package/{esm2020 → esm2022}/state/actions/reset-password.actions.mjs +0 -0
- /package/{esm2020 → esm2022}/state/config/default.mjs +0 -0
- /package/{esm2020 → esm2022}/state/config/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/state/config/token.mjs +0 -0
- /package/{esm2020 → esm2022}/state/config/type.mjs +0 -0
- /package/{esm2020 → esm2022}/state/daffodil-auth-state.mjs +0 -0
- /package/{esm2020 → esm2022}/state/facades/auth/facade.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/state/facades/auth/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/state/facades/login/facade.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/state/facades/login/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/state/facades/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/state/facades/register/facade.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/state/facades/register/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/state/facades/reset-password/facade.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/state/facades/reset-password/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/state/index.mjs +0 -0
- /package/{esm2020 → esm2022}/state/injection-tokens/error-matcher.token.mjs +0 -0
- /package/{esm2020 → esm2022}/state/injection-tokens/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/state/injection-tokens/unauthenticated/hook.token.mjs +0 -0
- /package/{esm2020 → esm2022}/state/injection-tokens/unauthenticated/hook.type.mjs +0 -0
- /package/{esm2020 → esm2022}/state/injection-tokens/unauthenticated/hooks.token.mjs +0 -0
- /package/{esm2020 → esm2022}/state/injection-tokens/unauthenticated/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/state/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/auth/auth-initial-state.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/auth/auth-reducer-state.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/auth/auth.reducer.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/auth/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/auth-feature-state.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/auth-reducers.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/auth-store-feature-key.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/login/login-initial-state.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/login/login-reducer-state.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/login/login.reducer.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/login/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/register/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/register/register-initial-state.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/register/register-reducer-state.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/register/register.reducer.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/reset-password/initial-state.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/reset-password/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/reset-password/reducer.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/reset-password/state.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/token/extra.token.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/token/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/state/reducers/token/reducers.token.mjs +0 -0
- /package/{esm2020 → esm2022}/state/selectors/auth/auth.selector.mjs +0 -0
- /package/{esm2020 → esm2022}/state/selectors/auth-all.selector.mjs +0 -0
- /package/{esm2020 → esm2022}/state/selectors/auth-feature.selector.mjs +0 -0
- /package/{esm2020 → esm2022}/state/selectors/login/login.selector.mjs +0 -0
- /package/{esm2020 → esm2022}/state/selectors/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/state/selectors/register/register.selector.mjs +0 -0
- /package/{esm2020 → esm2022}/state/selectors/reset-password/selector.mjs +0 -0
- /package/{esm2020 → esm2022}/state/testing/daffodil-auth-state-testing.mjs +0 -0
- /package/{esm2020 → esm2022}/state/testing/index.mjs +0 -0
- /package/{esm2020 → esm2022}/state/testing/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/daffodil-auth-testing.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/factories/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/index.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/public_api.mjs +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-auth-driver-testing.mjs","sources":["../../../libs/auth/driver/testing/src/drivers/auth/auth.service.ts","../../../libs/auth/driver/testing/src/drivers/login/login.service.ts","../../../libs/auth/driver/testing/src/drivers/register/register.service.ts","../../../libs/auth/driver/testing/src/drivers/reset-password/service.ts","../../../libs/auth/driver/testing/src/drivers/auth-driver.module.ts","../../../libs/auth/driver/testing/src/daffodil-auth-driver-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport { DaffAuthServiceInterface } from '@daffodil/auth/driver';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffTestingAuthService implements DaffAuthServiceInterface {\n check(): Observable<void> {\n return of(undefined);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\nimport { DaffLoginServiceInterface } from '@daffodil/auth/driver';\nimport { DaffAuthTokenFactory } from '@daffodil/auth/testing';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffTestingLoginService implements DaffLoginServiceInterface<DaffLoginInfo, DaffAuthToken> {\n constructor(private factory: DaffAuthTokenFactory) {}\n\n login(loginInfo: DaffLoginInfo): Observable<DaffAuthToken> {\n return of(this.factory.create());\n }\n\n logout(): Observable<void> {\n return of(undefined);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport {\n DaffAccountRegistration,\n DaffLoginInfo,\n} from '@daffodil/auth';\nimport { DaffRegisterServiceInterface } from '@daffodil/auth/driver';\nimport { DaffAuthTokenFactory } from '@daffodil/auth/testing';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffTestingRegisterService implements DaffRegisterServiceInterface {\n constructor(\n private authTokenFactory: DaffAuthTokenFactory,\n ) {}\n\n register(registration: DaffAccountRegistration): Observable<string> {\n return of(this.authTokenFactory.create().token);\n }\n\n registerOnly(registration: DaffLoginInfo): Observable<void> {\n return of(undefined);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffResetPasswordServiceInterface } from '@daffodil/auth/driver';\nimport { DaffAuthTokenFactory } from '@daffodil/auth/testing';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffTestingResetPasswordService implements DaffResetPasswordServiceInterface {\n constructor(\n private authTokenFactory: DaffAuthTokenFactory,\n ) {}\n\n resetPassword(): Observable<string> {\n return of(this.authTokenFactory.create().token);\n }\n\n resetPasswordOnly(info: DaffAuthResetPasswordInfo): Observable<void> {\n return of(undefined);\n }\n\n sendResetEmail(): Observable<void> {\n return of(undefined);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport {\n DaffLoginDriver,\n DaffRegisterDriver,\n DaffAuthDriver,\n DaffResetPasswordDriver,\n} from '@daffodil/auth/driver';\n\nimport { DaffTestingAuthService } from './auth/auth.service';\nimport { DaffTestingLoginService } from './login/login.service';\nimport { DaffTestingRegisterService } from './register/register.service';\nimport { DaffTestingResetPasswordService } from './reset-password/service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffAuthTestingDriverModule {\n static forRoot(): ModuleWithProviders<DaffAuthTestingDriverModule> {\n return {\n ngModule: DaffAuthTestingDriverModule,\n providers: [\n {\n provide: DaffLoginDriver,\n useExisting: DaffTestingLoginService,\n },\n {\n provide: DaffRegisterDriver,\n useExisting: DaffTestingRegisterService,\n },\n {\n provide: DaffAuthDriver,\n useExisting: DaffTestingAuthService,\n },\n {\n provide: DaffResetPasswordDriver,\n useExisting: DaffTestingResetPasswordService,\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAQA;;AAEG;MAIU,sBAAsB,CAAA;IACjC,KAAK,GAAA;AACH,QAAA,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC;KACtB
|
|
1
|
+
{"version":3,"file":"daffodil-auth-driver-testing.mjs","sources":["../../../libs/auth/driver/testing/src/drivers/auth/auth.service.ts","../../../libs/auth/driver/testing/src/drivers/login/login.service.ts","../../../libs/auth/driver/testing/src/drivers/register/register.service.ts","../../../libs/auth/driver/testing/src/drivers/reset-password/service.ts","../../../libs/auth/driver/testing/src/drivers/auth-driver.module.ts","../../../libs/auth/driver/testing/src/daffodil-auth-driver-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport { DaffAuthServiceInterface } from '@daffodil/auth/driver';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffTestingAuthService implements DaffAuthServiceInterface {\n check(): Observable<void> {\n return of(undefined);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\nimport { DaffLoginServiceInterface } from '@daffodil/auth/driver';\nimport { DaffAuthTokenFactory } from '@daffodil/auth/testing';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffTestingLoginService implements DaffLoginServiceInterface<DaffLoginInfo, DaffAuthToken> {\n constructor(private factory: DaffAuthTokenFactory) {}\n\n login(loginInfo: DaffLoginInfo): Observable<DaffAuthToken> {\n return of(this.factory.create());\n }\n\n logout(): Observable<void> {\n return of(undefined);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport {\n DaffAccountRegistration,\n DaffLoginInfo,\n} from '@daffodil/auth';\nimport { DaffRegisterServiceInterface } from '@daffodil/auth/driver';\nimport { DaffAuthTokenFactory } from '@daffodil/auth/testing';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffTestingRegisterService implements DaffRegisterServiceInterface {\n constructor(\n private authTokenFactory: DaffAuthTokenFactory,\n ) {}\n\n register(registration: DaffAccountRegistration): Observable<string> {\n return of(this.authTokenFactory.create().token);\n }\n\n registerOnly(registration: DaffLoginInfo): Observable<void> {\n return of(undefined);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffResetPasswordServiceInterface } from '@daffodil/auth/driver';\nimport { DaffAuthTokenFactory } from '@daffodil/auth/testing';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffTestingResetPasswordService implements DaffResetPasswordServiceInterface {\n constructor(\n private authTokenFactory: DaffAuthTokenFactory,\n ) {}\n\n resetPassword(): Observable<string> {\n return of(this.authTokenFactory.create().token);\n }\n\n resetPasswordOnly(info: DaffAuthResetPasswordInfo): Observable<void> {\n return of(undefined);\n }\n\n sendResetEmail(): Observable<void> {\n return of(undefined);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport {\n DaffLoginDriver,\n DaffRegisterDriver,\n DaffAuthDriver,\n DaffResetPasswordDriver,\n} from '@daffodil/auth/driver';\n\nimport { DaffTestingAuthService } from './auth/auth.service';\nimport { DaffTestingLoginService } from './login/login.service';\nimport { DaffTestingRegisterService } from './register/register.service';\nimport { DaffTestingResetPasswordService } from './reset-password/service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffAuthTestingDriverModule {\n static forRoot(): ModuleWithProviders<DaffAuthTestingDriverModule> {\n return {\n ngModule: DaffAuthTestingDriverModule,\n providers: [\n {\n provide: DaffLoginDriver,\n useExisting: DaffTestingLoginService,\n },\n {\n provide: DaffRegisterDriver,\n useExisting: DaffTestingRegisterService,\n },\n {\n provide: DaffAuthDriver,\n useExisting: DaffTestingAuthService,\n },\n {\n provide: DaffResetPasswordDriver,\n useExisting: DaffTestingResetPasswordService,\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAQA;;AAEG;MAIU,sBAAsB,CAAA;IACjC,KAAK,GAAA;AACH,QAAA,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC;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AAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,YAHpC,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;AAGH,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,YAHpC,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGH,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBALvC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA,CAAA;;;ACtBD;;AAEG;;;;"}
|
|
@@ -85,18 +85,18 @@ class DaffAuthDriverTokenCheck {
|
|
|
85
85
|
return this.driver.check();
|
|
86
86
|
}));
|
|
87
87
|
}
|
|
88
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffAuthDriverTokenCheck, deps: [{ token: i1.DaffAuthStorageService }, { token: DaffAuthDriver }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
89
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffAuthDriverTokenCheck, providedIn: 'root' }); }
|
|
88
90
|
}
|
|
89
|
-
|
|
90
|
-
/** @nocollapse */ DaffAuthDriverTokenCheck.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthDriverTokenCheck, providedIn: 'root' });
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthDriverTokenCheck, decorators: [{
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffAuthDriverTokenCheck, decorators: [{
|
|
92
92
|
type: Injectable,
|
|
93
93
|
args: [{
|
|
94
94
|
providedIn: 'root',
|
|
95
95
|
}]
|
|
96
|
-
}], ctorParameters:
|
|
96
|
+
}], ctorParameters: () => [{ type: i1.DaffAuthStorageService }, { type: undefined, decorators: [{
|
|
97
97
|
type: Inject,
|
|
98
98
|
args: [DaffAuthDriver]
|
|
99
|
-
}] }]
|
|
99
|
+
}] }] });
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
102
|
* The error codes that indicate that the user definitely should not be in an unauthenticated state
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-auth-driver.mjs","sources":["../../../libs/auth/driver/src/interfaces/auth-service.interface.ts","../../../libs/auth/driver/src/interfaces/login-service.interface.ts","../../../libs/auth/driver/src/interfaces/register-service.interface.ts","../../../libs/auth/driver/src/interfaces/reset-password-service.interface.ts","../../../libs/auth/driver/src/errors/codes.enum.ts","../../../libs/auth/driver/src/errors/unauthorized.ts","../../../libs/auth/driver/src/errors/authentication-failed.ts","../../../libs/auth/driver/src/errors/registration-failed.ts","../../../libs/auth/driver/src/errors/invalid-api-response.ts","../../../libs/auth/driver/src/errors/map.ts","../../../libs/auth/driver/src/services/auth-check.service.ts","../../../libs/auth/driver/src/constants/unauthenticated-error-codes.ts","../../../libs/auth/driver/src/daffodil-auth-driver.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nexport interface DaffAuthServiceInterface {\n /**\n * Checks the validity of an auth token.\n */\n check(): Observable<void>;\n}\n\nexport const DaffAuthDriver = new InjectionToken<DaffAuthServiceInterface>('DaffAuthDriver');\n","import { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\n\nexport interface DaffLoginServiceInterface<\n TRequest extends DaffLoginInfo = DaffLoginInfo,\n TResponse extends DaffAuthToken = DaffAuthToken\n> {\n /**\n * Logs the user in.\n *\n * @returns An access token.\n */\n login(loginInfo: TRequest): Observable<TResponse>;\n\n /**\n * Logs the user out by revoking their access token.\n */\n logout(): Observable<void>;\n}\n\nexport const DaffLoginDriver = new InjectionToken<DaffLoginServiceInterface>('DaffLoginDriver');\n","import { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\n\nexport interface DaffRegisterServiceInterface<\n TRequest extends DaffAccountRegistration = DaffAccountRegistration,\n> {\n\n /**\n * Registers an account for the specified customer and logs the customer in.\n *\n * @param registration The account registration info.\n * @return The authentication token.\n */\n register(registration: TRequest): Observable<string>;\n\n /**\n * Registers an account for the specified customer but does not log the customer in.\n *\n * @param registration The account registration info.\n */\n registerOnly(registration: TRequest): Observable<void>;\n}\n\nexport const DaffRegisterDriver = new InjectionToken<DaffRegisterServiceInterface>('DaffRegisterDriver');\n","import { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\n\nexport interface DaffResetPasswordServiceInterface<\n T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo,\n> {\n\n /**\n * Resets password for the specified customer and logs in.\n */\n resetPassword(info: T): Observable<string>;\n\n /**\n * Resets password for the specified customer.\n */\n resetPasswordOnly(info: T): Observable<void>;\n\n /**\n * Send a password reset email to the specified email address.\n */\n sendResetEmail(email: string): Observable<void>;\n}\n\nexport const DaffResetPasswordDriver = new InjectionToken<DaffResetPasswordServiceInterface>('DaffResetPasswordDriver');\n","export enum DaffAuthDriverErrorCodes {\n AUTHENTICATION_FAILED = 'DAFF_AUTH_AUTHENTICATION_FAILED',\n INVALID_API_RESPONSE = 'DAFF_AUTH_INVALID_API_RESPONSE',\n REGISTRATION_FAILED = 'DAFF_AUTH_REGISTRATION_FAILED',\n UNAUTHORIZED = 'DAFF_AUTH_UNAUTHORIZED',\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffAuthDriverErrorCodes } from './codes.enum';\n\nexport class DaffUnauthorizedError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffAuthDriverErrorCodes.UNAUTHORIZED;\n\n constructor(public message: string) {\n\t super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffAuthDriverErrorCodes } from './codes.enum';\n\nexport class DaffAuthenticationFailedError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffAuthDriverErrorCodes.AUTHENTICATION_FAILED;\n\n constructor(public message: string) {\n\t super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffAuthDriverErrorCodes } from './codes.enum';\n\n/**\n * An error thrown when registration failed.\n */\nexport class DaffRegistrationFailedError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffAuthDriverErrorCodes.REGISTRATION_FAILED;\n\n constructor(public message: string) {\n\t super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffAuthDriverErrorCodes } from './codes.enum';\n\nexport class DaffAuthInvalidAPIResponseError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffAuthDriverErrorCodes.INVALID_API_RESPONSE;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import { DaffAuthenticationFailedError } from './authentication-failed';\nimport { DaffAuthDriverErrorCodes } from './codes.enum';\nimport { DaffAuthInvalidAPIResponseError } from './invalid-api-response';\nimport { DaffRegistrationFailedError } from './registration-failed';\nimport { DaffUnauthorizedError } from './unauthorized';\n\n/**\n * A mapping from error codes to error class constructors.\n */\nexport const DaffAuthDriverErrorMap = {\n [DaffAuthDriverErrorCodes.AUTHENTICATION_FAILED]: DaffAuthenticationFailedError,\n [DaffAuthDriverErrorCodes.INVALID_API_RESPONSE]: DaffAuthInvalidAPIResponseError,\n [DaffAuthDriverErrorCodes.REGISTRATION_FAILED]: DaffRegistrationFailedError,\n [DaffAuthDriverErrorCodes.UNAUTHORIZED]: DaffUnauthorizedError,\n};\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport {\n Observable,\n map,\n of,\n switchMap,\n throwError,\n} from 'rxjs';\n\nimport {\n DaffAuthStorageService,\n DaffAuthMissingTokenError,\n} from '@daffodil/auth';\n\nimport {\n DaffAuthDriver,\n DaffAuthServiceInterface,\n} from '../interfaces/public_api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthDriverTokenCheck {\n constructor(\n private storage: DaffAuthStorageService,\n @Inject(DaffAuthDriver) private driver: DaffAuthServiceInterface,\n ) {}\n\n /**\n * Checks if the auth token in storage is valid.\n * If there is not an auth token in storage, the driver is not called\n * and an error is immediately thrown.\n */\n check(): Observable<void> {\n return of(null).pipe(\n switchMap(() => {\n const token = this.storage.getAuthToken();\n\n if (!token) {\n return throwError(() => new DaffAuthMissingTokenError('There is not an auth token in storage'));\n }\n\n return this.driver.check();\n }),\n );\n }\n}\n","import { DaffAuthDriverErrorCodes } from '../errors/public_api';\n\n/**\n * The error codes that indicate that the user definitely should not be in an unauthenticated state\n * and if an auth token exists in storage, it is invalid.\n * These are contrasted to network failures and other sporadic and generic errors that aren't\n * a guarantee of the token's invalidity.\n */\nexport const DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES = {\n [DaffAuthDriverErrorCodes.UNAUTHORIZED]: true,\n [DaffAuthDriverErrorCodes.AUTHENTICATION_FAILED]: true,\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAUa,cAAc,GAAG,IAAI,cAAc,CAA2B,gBAAgB;;MCe9E,eAAe,GAAG,IAAI,cAAc,CAA4B,iBAAiB;;MCAjF,kBAAkB,GAAG,IAAI,cAAc,CAA+B,oBAAoB;;MCA1F,uBAAuB,GAAG,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AAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,cAFvB,MAAM,EAAA,CAAA,CAAA;2FAEP,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;0BAII,MAAM;2BAAC,cAAc,CAAA;;;AC1B1B;;;;;AAKG;AACU,MAAA,qCAAqC,GAAG;AACnD,IAAA,CAAC,wBAAwB,CAAC,YAAY,GAAG,IAAI;AAC7C,IAAA,CAAC,wBAAwB,CAAC,qBAAqB,GAAG,IAAI;;;ACVxD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"daffodil-auth-driver.mjs","sources":["../../../libs/auth/driver/src/interfaces/auth-service.interface.ts","../../../libs/auth/driver/src/interfaces/login-service.interface.ts","../../../libs/auth/driver/src/interfaces/register-service.interface.ts","../../../libs/auth/driver/src/interfaces/reset-password-service.interface.ts","../../../libs/auth/driver/src/errors/codes.enum.ts","../../../libs/auth/driver/src/errors/unauthorized.ts","../../../libs/auth/driver/src/errors/authentication-failed.ts","../../../libs/auth/driver/src/errors/registration-failed.ts","../../../libs/auth/driver/src/errors/invalid-api-response.ts","../../../libs/auth/driver/src/errors/map.ts","../../../libs/auth/driver/src/services/auth-check.service.ts","../../../libs/auth/driver/src/constants/unauthenticated-error-codes.ts","../../../libs/auth/driver/src/daffodil-auth-driver.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nexport interface DaffAuthServiceInterface {\n /**\n * Checks the validity of an auth token.\n */\n check(): Observable<void>;\n}\n\nexport const DaffAuthDriver = new InjectionToken<DaffAuthServiceInterface>('DaffAuthDriver');\n","import { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\n\nexport interface DaffLoginServiceInterface<\n TRequest extends DaffLoginInfo = DaffLoginInfo,\n TResponse extends DaffAuthToken = DaffAuthToken\n> {\n /**\n * Logs the user in.\n *\n * @returns An access token.\n */\n login(loginInfo: TRequest): Observable<TResponse>;\n\n /**\n * Logs the user out by revoking their access token.\n */\n logout(): Observable<void>;\n}\n\nexport const DaffLoginDriver = new InjectionToken<DaffLoginServiceInterface>('DaffLoginDriver');\n","import { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\n\nexport interface DaffRegisterServiceInterface<\n TRequest extends DaffAccountRegistration = DaffAccountRegistration,\n> {\n\n /**\n * Registers an account for the specified customer and logs the customer in.\n *\n * @param registration The account registration info.\n * @return The authentication token.\n */\n register(registration: TRequest): Observable<string>;\n\n /**\n * Registers an account for the specified customer but does not log the customer in.\n *\n * @param registration The account registration info.\n */\n registerOnly(registration: TRequest): Observable<void>;\n}\n\nexport const DaffRegisterDriver = new InjectionToken<DaffRegisterServiceInterface>('DaffRegisterDriver');\n","import { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\n\nexport interface DaffResetPasswordServiceInterface<\n T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo,\n> {\n\n /**\n * Resets password for the specified customer and logs in.\n */\n resetPassword(info: T): Observable<string>;\n\n /**\n * Resets password for the specified customer.\n */\n resetPasswordOnly(info: T): Observable<void>;\n\n /**\n * Send a password reset email to the specified email address.\n */\n sendResetEmail(email: string): Observable<void>;\n}\n\nexport const DaffResetPasswordDriver = new InjectionToken<DaffResetPasswordServiceInterface>('DaffResetPasswordDriver');\n","export enum DaffAuthDriverErrorCodes {\n AUTHENTICATION_FAILED = 'DAFF_AUTH_AUTHENTICATION_FAILED',\n INVALID_API_RESPONSE = 'DAFF_AUTH_INVALID_API_RESPONSE',\n REGISTRATION_FAILED = 'DAFF_AUTH_REGISTRATION_FAILED',\n UNAUTHORIZED = 'DAFF_AUTH_UNAUTHORIZED',\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffAuthDriverErrorCodes } from './codes.enum';\n\nexport class DaffUnauthorizedError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffAuthDriverErrorCodes.UNAUTHORIZED;\n\n constructor(public message: string) {\n\t super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffAuthDriverErrorCodes } from './codes.enum';\n\nexport class DaffAuthenticationFailedError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffAuthDriverErrorCodes.AUTHENTICATION_FAILED;\n\n constructor(public message: string) {\n\t super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffAuthDriverErrorCodes } from './codes.enum';\n\n/**\n * An error thrown when registration failed.\n */\nexport class DaffRegistrationFailedError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffAuthDriverErrorCodes.REGISTRATION_FAILED;\n\n constructor(public message: string) {\n\t super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffAuthDriverErrorCodes } from './codes.enum';\n\nexport class DaffAuthInvalidAPIResponseError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffAuthDriverErrorCodes.INVALID_API_RESPONSE;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import { DaffAuthenticationFailedError } from './authentication-failed';\nimport { DaffAuthDriverErrorCodes } from './codes.enum';\nimport { DaffAuthInvalidAPIResponseError } from './invalid-api-response';\nimport { DaffRegistrationFailedError } from './registration-failed';\nimport { DaffUnauthorizedError } from './unauthorized';\n\n/**\n * A mapping from error codes to error class constructors.\n */\nexport const DaffAuthDriverErrorMap = {\n [DaffAuthDriverErrorCodes.AUTHENTICATION_FAILED]: DaffAuthenticationFailedError,\n [DaffAuthDriverErrorCodes.INVALID_API_RESPONSE]: DaffAuthInvalidAPIResponseError,\n [DaffAuthDriverErrorCodes.REGISTRATION_FAILED]: DaffRegistrationFailedError,\n [DaffAuthDriverErrorCodes.UNAUTHORIZED]: DaffUnauthorizedError,\n};\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport {\n Observable,\n map,\n of,\n switchMap,\n throwError,\n} from 'rxjs';\n\nimport {\n DaffAuthStorageService,\n DaffAuthMissingTokenError,\n} from '@daffodil/auth';\n\nimport {\n DaffAuthDriver,\n DaffAuthServiceInterface,\n} from '../interfaces/public_api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthDriverTokenCheck {\n constructor(\n private storage: DaffAuthStorageService,\n @Inject(DaffAuthDriver) private driver: DaffAuthServiceInterface,\n ) {}\n\n /**\n * Checks if the auth token in storage is valid.\n * If there is not an auth token in storage, the driver is not called\n * and an error is immediately thrown.\n */\n check(): Observable<void> {\n return of(null).pipe(\n switchMap(() => {\n const token = this.storage.getAuthToken();\n\n if (!token) {\n return throwError(() => new DaffAuthMissingTokenError('There is not an auth token in storage'));\n }\n\n return this.driver.check();\n }),\n );\n }\n}\n","import { DaffAuthDriverErrorCodes } from '../errors/public_api';\n\n/**\n * The error codes that indicate that the user definitely should not be in an unauthenticated state\n * and if an auth token exists in storage, it is invalid.\n * These are contrasted to network failures and other sporadic and generic errors that aren't\n * a guarantee of the token's invalidity.\n */\nexport const DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES = {\n [DaffAuthDriverErrorCodes.UNAUTHORIZED]: true,\n [DaffAuthDriverErrorCodes.AUTHENTICATION_FAILED]: true,\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAUa,cAAc,GAAG,IAAI,cAAc,CAA2B,gBAAgB;;MCe9E,eAAe,GAAG,IAAI,cAAc,CAA4B,iBAAiB;;MCAjF,kBAAkB,GAAG,IAAI,cAAc,CAA+B,oBAAoB;;MCA1F,uBAAuB,GAAG,IAAI,cAAc,CAA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AA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,cAFvB,MAAM,EAAA,CAAA,CAAA,EAAA;;2FAEP,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;0BAII,MAAM;2BAAC,cAAc,CAAA;;;AC1B1B;;;;;AAKG;AACU,MAAA,qCAAqC,GAAG;AACnD,IAAA,CAAC,wBAAwB,CAAC,YAAY,GAAG,IAAI;AAC7C,IAAA,CAAC,wBAAwB,CAAC,qBAAqB,GAAG,IAAI;;;ACVxD;;AAEG;;;;"}
|
|
@@ -39,21 +39,21 @@ class MemberOnlyGuard {
|
|
|
39
39
|
return of(false);
|
|
40
40
|
}));
|
|
41
41
|
}
|
|
42
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MemberOnlyGuard, deps: [{ token: i1.DaffAuthDriverTokenCheck }, { token: i2.DaffAuthStorageService }, { token: i3.Router }, { token: i4.Store }, { token: DAFF_AUTH_ERROR_MATCHER }, { token: DaffAuthMemberOnlyGuardRedirectUrl }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
43
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MemberOnlyGuard, providedIn: 'any' }); }
|
|
42
44
|
}
|
|
43
|
-
|
|
44
|
-
/** @nocollapse */ MemberOnlyGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MemberOnlyGuard, providedIn: 'any' });
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MemberOnlyGuard, decorators: [{
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MemberOnlyGuard, decorators: [{
|
|
46
46
|
type: Injectable,
|
|
47
47
|
args: [{
|
|
48
48
|
providedIn: 'any',
|
|
49
49
|
}]
|
|
50
|
-
}], ctorParameters:
|
|
50
|
+
}], ctorParameters: () => [{ type: i1.DaffAuthDriverTokenCheck }, { type: i2.DaffAuthStorageService }, { type: i3.Router }, { type: i4.Store }, { type: undefined, decorators: [{
|
|
51
51
|
type: Inject,
|
|
52
52
|
args: [DAFF_AUTH_ERROR_MATCHER]
|
|
53
53
|
}] }, { type: undefined, decorators: [{
|
|
54
54
|
type: Inject,
|
|
55
55
|
args: [DaffAuthMemberOnlyGuardRedirectUrl]
|
|
56
|
-
}] }]
|
|
56
|
+
}] }] });
|
|
57
57
|
|
|
58
58
|
const DaffAuthGuestOnlyGuardRedirectUrl = new InjectionToken('DaffAuthGuestOnlyGuardRedirectUrl', { factory: () => '/' });
|
|
59
59
|
|
|
@@ -81,21 +81,21 @@ class GuestOnlyGuard {
|
|
|
81
81
|
return of(true);
|
|
82
82
|
}));
|
|
83
83
|
}
|
|
84
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: GuestOnlyGuard, deps: [{ token: i1.DaffAuthDriverTokenCheck }, { token: i2.DaffAuthStorageService }, { token: i3.Router }, { token: i4.Store }, { token: DAFF_AUTH_ERROR_MATCHER }, { token: DaffAuthGuestOnlyGuardRedirectUrl }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
85
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: GuestOnlyGuard, providedIn: 'any' }); }
|
|
84
86
|
}
|
|
85
|
-
|
|
86
|
-
/** @nocollapse */ GuestOnlyGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuestOnlyGuard, providedIn: 'any' });
|
|
87
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuestOnlyGuard, decorators: [{
|
|
87
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: GuestOnlyGuard, decorators: [{
|
|
88
88
|
type: Injectable,
|
|
89
89
|
args: [{
|
|
90
90
|
providedIn: 'any',
|
|
91
91
|
}]
|
|
92
|
-
}], ctorParameters:
|
|
92
|
+
}], ctorParameters: () => [{ type: i1.DaffAuthDriverTokenCheck }, { type: i2.DaffAuthStorageService }, { type: i3.Router }, { type: i4.Store }, { type: undefined, decorators: [{
|
|
93
93
|
type: Inject,
|
|
94
94
|
args: [DAFF_AUTH_ERROR_MATCHER]
|
|
95
95
|
}] }, { type: undefined, decorators: [{
|
|
96
96
|
type: Inject,
|
|
97
97
|
args: [DaffAuthGuestOnlyGuardRedirectUrl]
|
|
98
|
-
}] }]
|
|
98
|
+
}] }] });
|
|
99
99
|
|
|
100
100
|
const DAFF_AUTH_ROUTING_CONFIG_DEFAULT = {
|
|
101
101
|
resetPasswordTokenParam: 'token',
|
|
@@ -135,18 +135,18 @@ class DaffAuthResetPasswordGuard {
|
|
|
135
135
|
this.facade.dispatch(new DaffResetPasswordLanding(token));
|
|
136
136
|
return of(true);
|
|
137
137
|
}
|
|
138
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffAuthResetPasswordGuard, deps: [{ token: i1$1.DaffAuthFacade }, { token: DAFF_AUTH_ROUTING_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
139
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffAuthResetPasswordGuard, providedIn: 'any' }); }
|
|
138
140
|
}
|
|
139
|
-
|
|
140
|
-
/** @nocollapse */ DaffAuthResetPasswordGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthResetPasswordGuard, providedIn: 'any' });
|
|
141
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthResetPasswordGuard, decorators: [{
|
|
141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffAuthResetPasswordGuard, decorators: [{
|
|
142
142
|
type: Injectable,
|
|
143
143
|
args: [{
|
|
144
144
|
providedIn: 'any',
|
|
145
145
|
}]
|
|
146
|
-
}], ctorParameters:
|
|
146
|
+
}], ctorParameters: () => [{ type: i1$1.DaffAuthFacade }, { type: undefined, decorators: [{
|
|
147
147
|
type: Inject,
|
|
148
148
|
args: [DAFF_AUTH_ROUTING_CONFIG]
|
|
149
|
-
}] }]
|
|
149
|
+
}] }] });
|
|
150
150
|
|
|
151
151
|
function daffAuthRoutingRedirectUnauthenticatedHookFactory(router, route, config) {
|
|
152
152
|
return (trigger) => {
|
|
@@ -171,15 +171,15 @@ class DaffAuthRoutingModule {
|
|
|
171
171
|
],
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffAuthRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
175
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: DaffAuthRoutingModule }); }
|
|
176
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffAuthRoutingModule, providers: [
|
|
177
|
+
DaffAuthResetPasswordGuard,
|
|
178
|
+
MemberOnlyGuard,
|
|
179
|
+
GuestOnlyGuard,
|
|
180
|
+
] }); }
|
|
174
181
|
}
|
|
175
|
-
|
|
176
|
-
/** @nocollapse */ DaffAuthRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRoutingModule });
|
|
177
|
-
/** @nocollapse */ DaffAuthRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRoutingModule, providers: [
|
|
178
|
-
DaffAuthResetPasswordGuard,
|
|
179
|
-
MemberOnlyGuard,
|
|
180
|
-
GuestOnlyGuard,
|
|
181
|
-
] });
|
|
182
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRoutingModule, decorators: [{
|
|
182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffAuthRoutingModule, decorators: [{
|
|
183
183
|
type: NgModule,
|
|
184
184
|
args: [{
|
|
185
185
|
providers: [
|
|
@@ -208,30 +208,30 @@ class DaffAuthRedirectEffects {
|
|
|
208
208
|
this.router.navigateByUrl(this.route.snapshot.queryParamMap.get(this.config.redirectUrlParam) || this.config.authCompleteRedirectPath);
|
|
209
209
|
}), switchMap(() => EMPTY)), { dispatch: false });
|
|
210
210
|
}
|
|
211
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffAuthRedirectEffects, deps: [{ token: i1$2.Actions }, { token: i3.Router }, { token: i3.ActivatedRoute }, { token: DAFF_AUTH_ROUTING_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
212
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffAuthRedirectEffects }); }
|
|
211
213
|
}
|
|
212
|
-
|
|
213
|
-
/** @nocollapse */ DaffAuthRedirectEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRedirectEffects });
|
|
214
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRedirectEffects, decorators: [{
|
|
214
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffAuthRedirectEffects, decorators: [{
|
|
215
215
|
type: Injectable
|
|
216
|
-
}], ctorParameters:
|
|
216
|
+
}], ctorParameters: () => [{ type: i1$2.Actions }, { type: i3.Router }, { type: i3.ActivatedRoute }, { type: undefined, decorators: [{
|
|
217
217
|
type: Inject,
|
|
218
218
|
args: [DAFF_AUTH_ROUTING_CONFIG]
|
|
219
|
-
}] }]
|
|
219
|
+
}] }] });
|
|
220
220
|
|
|
221
221
|
class DaffAuthRoutingRedirectModule {
|
|
222
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffAuthRoutingRedirectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
223
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: DaffAuthRoutingRedirectModule, imports: [i1$2.EffectsFeatureModule] }); }
|
|
224
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffAuthRoutingRedirectModule, providers: [
|
|
225
|
+
{
|
|
226
|
+
provide: DAFF_AUTH_UNAUTHENTICATED_HOOKS,
|
|
227
|
+
multi: true,
|
|
228
|
+
useFactory: (() => daffAuthRoutingRedirectUnauthenticatedHookFactory(inject(Router), inject(ActivatedRoute), inject(DAFF_AUTH_ROUTING_CONFIG))),
|
|
229
|
+
},
|
|
230
|
+
], imports: [EffectsModule.forFeature([
|
|
231
|
+
DaffAuthRedirectEffects,
|
|
232
|
+
])] }); }
|
|
222
233
|
}
|
|
223
|
-
|
|
224
|
-
/** @nocollapse */ DaffAuthRoutingRedirectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRoutingRedirectModule, imports: [i1$2.EffectsFeatureModule] });
|
|
225
|
-
/** @nocollapse */ DaffAuthRoutingRedirectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRoutingRedirectModule, providers: [
|
|
226
|
-
{
|
|
227
|
-
provide: DAFF_AUTH_UNAUTHENTICATED_HOOKS,
|
|
228
|
-
multi: true,
|
|
229
|
-
useFactory: (() => daffAuthRoutingRedirectUnauthenticatedHookFactory(inject(Router), inject(ActivatedRoute), inject(DAFF_AUTH_ROUTING_CONFIG))),
|
|
230
|
-
},
|
|
231
|
-
], imports: [EffectsModule.forFeature([
|
|
232
|
-
DaffAuthRedirectEffects,
|
|
233
|
-
])] });
|
|
234
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRoutingRedirectModule, decorators: [{
|
|
234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffAuthRoutingRedirectModule, decorators: [{
|
|
235
235
|
type: NgModule,
|
|
236
236
|
args: [{
|
|
237
237
|
imports: [
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daffodil-auth-routing.mjs","sources":["../../../libs/auth/routing/src/guards/member-only-guard-redirect.token.ts","../../../libs/auth/routing/src/guards/member-only.guard.ts","../../../libs/auth/routing/src/guards/guest-only-guard-redirect.token.ts","../../../libs/auth/routing/src/guards/guest-only.guard.ts","../../../libs/auth/routing/src/config/default.ts","../../../libs/auth/routing/src/config/token.ts","../../../libs/auth/routing/src/guards/reset-password.guard.ts","../../../libs/auth/routing/src/helpers/redirect-unauthenticated-hook-factory.ts","../../../libs/auth/routing/src/module.ts","../../../libs/auth/routing/src/effects/redirect.effects.ts","../../../libs/auth/routing/src/redirect.module.ts","../../../libs/auth/routing/src/daffodil-auth-routing.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const DaffAuthMemberOnlyGuardRedirectUrl = new InjectionToken<string>('DaffAuthMemberOnlyGuardRedirectUrl', { factory: () => '/' });\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport { Store } from '@ngrx/store';\nimport {\n Observable,\n of,\n} from 'rxjs';\nimport {\n catchError,\n map,\n tap,\n} from 'rxjs/operators';\n\nimport { DaffAuthStorageService } from '@daffodil/auth';\nimport {\n DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES,\n DaffAuthDriverErrorCodes,\n DaffAuthDriverTokenCheck,\n} from '@daffodil/auth/driver';\nimport {\n DAFF_AUTH_ERROR_MATCHER,\n DaffAuthGuardLogout,\n} from '@daffodil/auth/state';\nimport { DaffError } from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\n\nimport { DaffAuthMemberOnlyGuardRedirectUrl } from './member-only-guard-redirect.token';\n\n\n@Injectable({\n providedIn: 'any',\n})\nexport class MemberOnlyGuard {\n constructor(\n private tokenCheck: DaffAuthDriverTokenCheck,\n private storage: DaffAuthStorageService,\n private router: Router,\n private store: Store,\n @Inject(DAFF_AUTH_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n @Inject(DaffAuthMemberOnlyGuardRedirectUrl) private redirectUrl: string,\n ) {}\n\n canActivate(): Observable<boolean> {\n return this.isAuthenticated().pipe(\n tap(result => {\n if (!result) {\n this.router.navigateByUrl(this.redirectUrl);\n }\n }),\n );\n }\n\n private isAuthenticated(): Observable<boolean> {\n return this.tokenCheck.check().pipe(\n map(() => true),\n catchError((error: DaffError) => {\n if (DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES[error.code]) {\n this.store.dispatch(new DaffAuthGuardLogout(this.errorMatcher(error)));\n }\n return of(false);\n }),\n );\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const DaffAuthGuestOnlyGuardRedirectUrl = new InjectionToken<string>('DaffAuthGuestOnlyGuardRedirectUrl', { factory: () => '/' });\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport { Store } from '@ngrx/store';\nimport {\n Observable,\n of,\n} from 'rxjs';\nimport {\n catchError,\n map,\n tap,\n} from 'rxjs/operators';\n\nimport { DaffAuthStorageService } from '@daffodil/auth';\nimport {\n DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES,\n DaffAuthDriverErrorCodes,\n DaffAuthDriverTokenCheck,\n} from '@daffodil/auth/driver';\nimport {\n DAFF_AUTH_ERROR_MATCHER,\n DaffAuthGuardLogout,\n} from '@daffodil/auth/state';\nimport { DaffError } from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\n\nimport { DaffAuthGuestOnlyGuardRedirectUrl } from './guest-only-guard-redirect.token';\n\n@Injectable({\n providedIn: 'any',\n})\nexport class GuestOnlyGuard {\n constructor(\n private tokenCheck: DaffAuthDriverTokenCheck,\n private storage: DaffAuthStorageService,\n private router: Router,\n private store: Store,\n @Inject(DAFF_AUTH_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n @Inject(DaffAuthGuestOnlyGuardRedirectUrl) private redirectUrl: string,\n ) {}\n\n canActivate(): Observable<boolean> {\n return this.isUnauthenticated().pipe(\n tap(result => {\n if (!result) {\n this.router.navigateByUrl(this.redirectUrl);\n }\n }),\n );\n }\n\n private isUnauthenticated(): Observable<boolean> {\n return this.tokenCheck.check().pipe(\n map(() => false),\n catchError((error: DaffError) => {\n if (DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES[error.code]) {\n this.store.dispatch(new DaffAuthGuardLogout(this.errorMatcher(error)));\n }\n return of(true);\n }),\n );\n }\n}\n","import { DaffAuthRoutingConfig } from './interface';\n\nexport const DAFF_AUTH_ROUTING_CONFIG_DEFAULT: DaffAuthRoutingConfig = {\n resetPasswordTokenParam: 'token',\n redirectUrlParam: 'redirect',\n authCompleteRedirectPath: '/',\n logoutRedirectPath: '/',\n tokenExpirationRedirectPath: '/',\n};\n","import {\n InjectionToken,\n ValueProvider,\n} from '@angular/core';\n\nimport { DAFF_AUTH_ROUTING_CONFIG_DEFAULT } from './default';\nimport { DaffAuthRoutingConfig } from './interface';\n\n/**\n * The token used to provide @daffodil/auth/routing config data.\n */\nexport const DAFF_AUTH_ROUTING_CONFIG = new InjectionToken<DaffAuthRoutingConfig>('DAFF_AUTH_ROUTING_CONFIG', {\n factory: () => DAFF_AUTH_ROUTING_CONFIG_DEFAULT,\n});\n\nexport function provideDaffAuthRoutingConfig(config?: Partial<DaffAuthRoutingConfig>): ValueProvider {\n return {\n provide: DAFF_AUTH_ROUTING_CONFIG,\n useValue: {\n ...DAFF_AUTH_ROUTING_CONFIG_DEFAULT,\n ...config || {},\n },\n };\n};\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport { ActivatedRouteSnapshot } from '@angular/router';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport {\n DaffAuthFacade,\n DaffResetPasswordLanding,\n} from '@daffodil/auth/state';\n\nimport {\n DaffAuthRoutingConfig,\n DAFF_AUTH_ROUTING_CONFIG,\n} from '../config/public_api';\n\n@Injectable({\n providedIn: 'any',\n})\nexport class DaffAuthResetPasswordGuard {\n constructor(\n private facade: DaffAuthFacade,\n @Inject(DAFF_AUTH_ROUTING_CONFIG) private config: DaffAuthRoutingConfig,\n ) {}\n\n canActivate(route: ActivatedRouteSnapshot): Observable<boolean> {\n const token = route.queryParamMap.get(this.config.resetPasswordTokenParam);\n\n if (!token) {\n return of(false);\n }\n\n this.facade.dispatch(new DaffResetPasswordLanding(token));\n\n return of(true);\n }\n}\n","import {\n ActivatedRoute,\n Router,\n} from '@angular/router';\nimport {\n from,\n of,\n} from 'rxjs';\n\nimport {\n DaffAuthActionTypes,\n DaffAuthLoginActionTypes,\n DaffAuthUnauthenticatedHook,\n} from '@daffodil/auth/state';\n\nimport { DaffAuthRoutingConfig } from '../config/public_api';\n\nexport function daffAuthRoutingRedirectUnauthenticatedHookFactory(router: Router, route: ActivatedRoute, config: DaffAuthRoutingConfig): DaffAuthUnauthenticatedHook {\n return (trigger) => {\n switch (trigger) {\n case DaffAuthLoginActionTypes.LogoutSuccessAction:\n return from(router.navigateByUrl(route.snapshot.queryParamMap.get(config.redirectUrlParam) || config.logoutRedirectPath));\n\n case DaffAuthActionTypes.AuthCheckFailureAction:\n case DaffAuthActionTypes.AuthGuardLogoutAction:\n return from(router.navigateByUrl(route.snapshot.queryParamMap.get(config.redirectUrlParam) || config.tokenExpirationRedirectPath));\n\n default:\n return of(null);\n }\n };\n}\n","import {\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\n\nimport {\n DaffAuthRoutingConfig,\n DAFF_AUTH_ROUTING_CONFIG,\n DAFF_AUTH_ROUTING_CONFIG_DEFAULT,\n provideDaffAuthRoutingConfig,\n} from './config/public_api';\nimport {\n DaffAuthResetPasswordGuard,\n GuestOnlyGuard,\n MemberOnlyGuard,\n} from './guards/public_api';\n\n@NgModule({\n providers: [\n DaffAuthResetPasswordGuard,\n MemberOnlyGuard,\n GuestOnlyGuard,\n ],\n})\nexport class DaffAuthRoutingModule {\n static withConfig(config?: Partial<DaffAuthRoutingConfig>): ModuleWithProviders<DaffAuthRoutingModule> {\n return {\n ngModule: DaffAuthRoutingModule,\n providers: [\n provideDaffAuthRoutingConfig(config),\n ],\n };\n }\n}\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport {\n ActivatedRoute,\n Router,\n} from '@angular/router';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport { EMPTY } from 'rxjs';\nimport {\n filter,\n switchMap,\n tap,\n} from 'rxjs/operators';\n\nimport {\n DaffAuthActionTypes,\n DaffAuthActions,\n DaffAuthLoginActionTypes,\n DaffAuthLoginActions,\n DaffAuthRegisterActionTypes,\n DaffAuthRegisterActions,\n DaffAuthResetPasswordActionTypes,\n DaffAuthResetPasswordActions,\n} from '@daffodil/auth/state';\n\nimport {\n DaffAuthRoutingConfig,\n DAFF_AUTH_ROUTING_CONFIG,\n} from '../config/public_api';\n\n/**\n * Redirects the user to certain pages based on certain auth actions.\n */\n@Injectable()\nexport class DaffAuthRedirectEffects {\n constructor(\n private actions$: Actions<DaffAuthLoginActions | DaffAuthActions | DaffAuthRegisterActions | DaffAuthResetPasswordActions>,\n private router: Router,\n private route: ActivatedRoute,\n @Inject(DAFF_AUTH_ROUTING_CONFIG) private config: DaffAuthRoutingConfig,\n ) {}\n\n redirectAfterLoginOrRegister$ = createEffect(() => this.actions$.pipe(\n ofType(\n DaffAuthLoginActionTypes.LoginSuccessAction,\n DaffAuthRegisterActionTypes.RegisterSuccessAction,\n DaffAuthResetPasswordActionTypes.ResetPasswordSuccessAction,\n ),\n filter((action) => {\n if ((action.type === DaffAuthRegisterActionTypes.RegisterSuccessAction || action.type === DaffAuthResetPasswordActionTypes.ResetPasswordSuccessAction) && !action.token) {\n return false;\n }\n return true;\n }),\n tap((action) => {\n this.router.navigateByUrl(this.route.snapshot.queryParamMap.get(this.config.redirectUrlParam) || this.config.authCompleteRedirectPath);\n }),\n switchMap(() => EMPTY),\n ), { dispatch: false });\n}\n","import {\n NgModule,\n inject,\n} from '@angular/core';\nimport {\n ActivatedRoute,\n Router,\n} from '@angular/router';\nimport { EffectsModule } from '@ngrx/effects';\nimport {\n from,\n of,\n} from 'rxjs';\n\nimport {\n DAFF_AUTH_UNAUTHENTICATED_HOOKS,\n DaffAuthActionTypes,\n DaffAuthLoginActionTypes,\n DaffAuthUnauthenticatedHook,\n} from '@daffodil/auth/state';\n\nimport { DAFF_AUTH_ROUTING_CONFIG } from './config/public_api';\nimport { DaffAuthRedirectEffects } from './effects/redirect.effects';\nimport { daffAuthRoutingRedirectUnauthenticatedHookFactory } from './helpers/public_api';\n\n\n@NgModule({\n imports: [\n EffectsModule.forFeature([\n DaffAuthRedirectEffects,\n ]),\n ],\n providers: [\n {\n provide: DAFF_AUTH_UNAUTHENTICATED_HOOKS,\n multi: true,\n useFactory: () =>\n daffAuthRoutingRedirectUnauthenticatedHookFactory(\n inject(Router),\n inject(ActivatedRoute),\n inject(DAFF_AUTH_ROUTING_CONFIG),\n ),\n },\n ],\n})\nexport class DaffAuthRoutingRedirectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;AAEa,MAAA,kCAAkC,GAAG,IAAI,cAAc,CAAS,oCAAoC,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,EAAE;;MCiC5H,eAAe,CAAA;IAC1B,WACU,CAAA,UAAoC,EACpC,OAA+B,EAC/B,MAAc,EACd,KAAY,EACqB,YAA8B,EACnB,WAAmB,EAAA;QAL/D,IAAU,CAAA,UAAA,GAAV,UAAU,CAA0B;QACpC,IAAO,CAAA,OAAA,GAAP,OAAO,CAAwB;QAC/B,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QACd,IAAK,CAAA,KAAA,GAAL,KAAK,CAAO;QACqB,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAkB;QACnB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAQ;KACrE;IAEJ,WAAW,GAAA;QACT,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC,IAAI,CAChC,GAAG,CAAC,MAAM,IAAG;YACX,IAAI,CAAC,MAAM,EAAE;gBACX,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAC7C,aAAA;SACF,CAAC,CACH,CAAC;KACH;IAEO,eAAe,GAAA;QACrB,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC,IAAI,CAC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C;4BACvB,uBAAuB;yBACxB,CAAC;AACH,qBAAA;AACD,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,+BAA+B;AACxC,4BAAA,KAAK,EAAE,IAAI;4BACX,UAAU,GAAE,MACV,iDAAiD,CAC/C,MAAM,CAAC,MAAM,CAAC,EACd,MAAM,CAAC,cAAc,CAAC,EACtB,MAAM,CAAC,wBAAwB,CAAC,CACjC,CAAA;AACJ,yBAAA;AACF,qBAAA;AACF,iBAAA,CAAA;;;AC5CD;;AAEG;;;;"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, NgModule } from '@angular/core';
|
|
3
|
+
import { DaffAuthFacade, DaffAuthLoginFacade, DaffAuthRegisterFacade, DaffAuthResetPasswordFacade } from '@daffodil/auth/state';
|
|
4
|
+
import { BehaviorSubject } from 'rxjs';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @inheritdoc
|
|
8
|
+
*/
|
|
9
|
+
class MockDaffAuthFacade {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.loading$ = new BehaviorSubject(false);
|
|
12
|
+
this.errors$ = new BehaviorSubject([]);
|
|
13
|
+
this.loggedIn$ = new BehaviorSubject(false);
|
|
14
|
+
}
|
|
15
|
+
dispatch(action) { }
|
|
16
|
+
;
|
|
17
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MockDaffAuthFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
18
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MockDaffAuthFacade, providedIn: 'root' }); }
|
|
19
|
+
}
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MockDaffAuthFacade, decorators: [{
|
|
21
|
+
type: Injectable,
|
|
22
|
+
args: [{ providedIn: 'root' }]
|
|
23
|
+
}] });
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @inheritdoc
|
|
27
|
+
*/
|
|
28
|
+
class MockDaffAuthLoginFacade {
|
|
29
|
+
constructor() {
|
|
30
|
+
this.loading$ = new BehaviorSubject(false);
|
|
31
|
+
this.errors$ = new BehaviorSubject([]);
|
|
32
|
+
}
|
|
33
|
+
dispatch(action) { }
|
|
34
|
+
;
|
|
35
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MockDaffAuthLoginFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
36
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MockDaffAuthLoginFacade, providedIn: 'root' }); }
|
|
37
|
+
}
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MockDaffAuthLoginFacade, decorators: [{
|
|
39
|
+
type: Injectable,
|
|
40
|
+
args: [{ providedIn: 'root' }]
|
|
41
|
+
}] });
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @inheritdoc
|
|
45
|
+
*/
|
|
46
|
+
class MockDaffAuthRegisterFacade {
|
|
47
|
+
constructor() {
|
|
48
|
+
this.loading$ = new BehaviorSubject(false);
|
|
49
|
+
this.errors$ = new BehaviorSubject([]);
|
|
50
|
+
}
|
|
51
|
+
dispatch(action) { }
|
|
52
|
+
;
|
|
53
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MockDaffAuthRegisterFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
54
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MockDaffAuthRegisterFacade, providedIn: 'root' }); }
|
|
55
|
+
}
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MockDaffAuthRegisterFacade, decorators: [{
|
|
57
|
+
type: Injectable,
|
|
58
|
+
args: [{ providedIn: 'root' }]
|
|
59
|
+
}] });
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @inheritdoc
|
|
63
|
+
*/
|
|
64
|
+
class MockDaffAuthResetPasswordFacade {
|
|
65
|
+
constructor() {
|
|
66
|
+
this.token$ = new BehaviorSubject('');
|
|
67
|
+
this.loading$ = new BehaviorSubject(false);
|
|
68
|
+
this.errors$ = new BehaviorSubject([]);
|
|
69
|
+
}
|
|
70
|
+
dispatch(action) { }
|
|
71
|
+
;
|
|
72
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MockDaffAuthResetPasswordFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
73
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MockDaffAuthResetPasswordFacade, providedIn: 'root' }); }
|
|
74
|
+
}
|
|
75
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MockDaffAuthResetPasswordFacade, decorators: [{
|
|
76
|
+
type: Injectable,
|
|
77
|
+
args: [{ providedIn: 'root' }]
|
|
78
|
+
}] });
|
|
79
|
+
|
|
80
|
+
class DaffAuthStateTestingModule {
|
|
81
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffAuthStateTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
82
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: DaffAuthStateTestingModule }); }
|
|
83
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffAuthStateTestingModule, providers: [
|
|
84
|
+
{ provide: DaffAuthFacade, useExisting: MockDaffAuthFacade },
|
|
85
|
+
{ provide: DaffAuthLoginFacade, useExisting: MockDaffAuthLoginFacade },
|
|
86
|
+
{ provide: DaffAuthRegisterFacade, useExisting: MockDaffAuthRegisterFacade },
|
|
87
|
+
{ provide: DaffAuthResetPasswordFacade, useExisting: MockDaffAuthResetPasswordFacade },
|
|
88
|
+
] }); }
|
|
89
|
+
}
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffAuthStateTestingModule, decorators: [{
|
|
91
|
+
type: NgModule,
|
|
92
|
+
args: [{
|
|
93
|
+
providers: [
|
|
94
|
+
{ provide: DaffAuthFacade, useExisting: MockDaffAuthFacade },
|
|
95
|
+
{ provide: DaffAuthLoginFacade, useExisting: MockDaffAuthLoginFacade },
|
|
96
|
+
{ provide: DaffAuthRegisterFacade, useExisting: MockDaffAuthRegisterFacade },
|
|
97
|
+
{ provide: DaffAuthResetPasswordFacade, useExisting: MockDaffAuthResetPasswordFacade },
|
|
98
|
+
],
|
|
99
|
+
}]
|
|
100
|
+
}] });
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Generated bundle index. Do not edit.
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
export { DaffAuthStateTestingModule, MockDaffAuthFacade, MockDaffAuthLoginFacade, MockDaffAuthRegisterFacade, MockDaffAuthResetPasswordFacade };
|
|
107
|
+
//# sourceMappingURL=daffodil-auth-state-testing.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-auth-state-testing.mjs","sources":["../../../libs/auth/state/testing/src/mock-auth-facade.ts","../../../libs/auth/state/testing/src/mock-login-facade.ts","../../../libs/auth/state/testing/src/mock-register-facade.ts","../../../libs/auth/state/testing/src/mock-reset-password-facade.ts","../../../libs/auth/state/testing/src/auth-testing.module.ts","../../../libs/auth/state/testing/src/daffodil-auth-state-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffAuthFacadeInterface } from '@daffodil/auth/state';\nimport { DaffStateError } from '@daffodil/core/state';\n\n/**\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffAuthFacade implements DaffAuthFacadeInterface {\n loading$ = new BehaviorSubject<boolean>(false);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n loggedIn$ = new BehaviorSubject<boolean>(false);\n\n dispatch(action: Action) {};\n}\n","import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffAuthLoginFacadeInterface } from '@daffodil/auth/state';\nimport { DaffStateError } from '@daffodil/core/state';\n\n/**\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffAuthLoginFacade implements DaffAuthLoginFacadeInterface {\n loading$ = new BehaviorSubject<boolean>(false);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n\n dispatch(action: Action) {};\n}\n","import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffAuthRegisterFacadeInterface } from '@daffodil/auth/state';\nimport { DaffStateError } from '@daffodil/core/state';\n\n/**\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffAuthRegisterFacade implements DaffAuthRegisterFacadeInterface {\n loading$ = new BehaviorSubject<boolean>(false);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n\n dispatch(action: Action) {};\n}\n","import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffAuthResetPasswordFacadeInterface } from '@daffodil/auth/state';\nimport { DaffStateError } from '@daffodil/core/state';\n\n/**\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffAuthResetPasswordFacade implements DaffAuthResetPasswordFacadeInterface {\n token$ = new BehaviorSubject<string>('');\n loading$ = new BehaviorSubject<boolean>(false);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n\n dispatch(action: Action) {};\n}\n","import { NgModule } from '@angular/core';\n\nimport {\n DaffAuthFacade,\n DaffAuthLoginFacade,\n DaffAuthRegisterFacade,\n DaffAuthResetPasswordFacade,\n} from '@daffodil/auth/state';\n\nimport { MockDaffAuthFacade } from './mock-auth-facade';\nimport { MockDaffAuthLoginFacade } from './mock-login-facade';\nimport { MockDaffAuthRegisterFacade } from './mock-register-facade';\nimport { MockDaffAuthResetPasswordFacade } from './mock-reset-password-facade';\n\n@NgModule({\n providers: [\n { provide: DaffAuthFacade, useExisting: MockDaffAuthFacade },\n { provide: DaffAuthLoginFacade, useExisting: MockDaffAuthLoginFacade },\n { provide: DaffAuthRegisterFacade, useExisting: MockDaffAuthRegisterFacade },\n { provide: DaffAuthResetPasswordFacade, useExisting: MockDaffAuthResetPasswordFacade },\n ],\n})\nexport class DaffAuthStateTestingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAOA;;AAEG;MAEU,kBAAkB,CAAA;AAD/B,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC,CAAC;AAC/C,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,eAAe,CAAmB,EAAE,CAAC,CAAC;AACpD,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC,CAAC;AAGjD,KAAA;IADC,QAAQ,CAAC,MAAc,EAAA,GAAI
|
|
1
|
+
{"version":3,"file":"daffodil-auth-state-testing.mjs","sources":["../../../libs/auth/state/testing/src/mock-auth-facade.ts","../../../libs/auth/state/testing/src/mock-login-facade.ts","../../../libs/auth/state/testing/src/mock-register-facade.ts","../../../libs/auth/state/testing/src/mock-reset-password-facade.ts","../../../libs/auth/state/testing/src/auth-testing.module.ts","../../../libs/auth/state/testing/src/daffodil-auth-state-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffAuthFacadeInterface } from '@daffodil/auth/state';\nimport { DaffStateError } from '@daffodil/core/state';\n\n/**\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffAuthFacade implements DaffAuthFacadeInterface {\n loading$ = new BehaviorSubject<boolean>(false);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n loggedIn$ = new BehaviorSubject<boolean>(false);\n\n dispatch(action: Action) {};\n}\n","import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffAuthLoginFacadeInterface } from '@daffodil/auth/state';\nimport { DaffStateError } from '@daffodil/core/state';\n\n/**\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffAuthLoginFacade implements DaffAuthLoginFacadeInterface {\n loading$ = new BehaviorSubject<boolean>(false);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n\n dispatch(action: Action) {};\n}\n","import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffAuthRegisterFacadeInterface } from '@daffodil/auth/state';\nimport { DaffStateError } from '@daffodil/core/state';\n\n/**\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffAuthRegisterFacade implements DaffAuthRegisterFacadeInterface {\n loading$ = new BehaviorSubject<boolean>(false);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n\n dispatch(action: Action) {};\n}\n","import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffAuthResetPasswordFacadeInterface } from '@daffodil/auth/state';\nimport { DaffStateError } from '@daffodil/core/state';\n\n/**\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffAuthResetPasswordFacade implements DaffAuthResetPasswordFacadeInterface {\n token$ = new BehaviorSubject<string>('');\n loading$ = new BehaviorSubject<boolean>(false);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n\n dispatch(action: Action) {};\n}\n","import { NgModule } from '@angular/core';\n\nimport {\n DaffAuthFacade,\n DaffAuthLoginFacade,\n DaffAuthRegisterFacade,\n DaffAuthResetPasswordFacade,\n} from '@daffodil/auth/state';\n\nimport { MockDaffAuthFacade } from './mock-auth-facade';\nimport { MockDaffAuthLoginFacade } from './mock-login-facade';\nimport { MockDaffAuthRegisterFacade } from './mock-register-facade';\nimport { MockDaffAuthResetPasswordFacade } from './mock-reset-password-facade';\n\n@NgModule({\n providers: [\n { provide: DaffAuthFacade, useExisting: MockDaffAuthFacade },\n { provide: DaffAuthLoginFacade, useExisting: MockDaffAuthLoginFacade },\n { provide: DaffAuthRegisterFacade, useExisting: MockDaffAuthRegisterFacade },\n { provide: DaffAuthResetPasswordFacade, useExisting: MockDaffAuthResetPasswordFacade },\n ],\n})\nexport class DaffAuthStateTestingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAOA;;AAEG;MAEU,kBAAkB,CAAA;AAD/B,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC,CAAC;AAC/C,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,eAAe,CAAmB,EAAE,CAAC,CAAC;AACpD,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,eA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