@daffodil/auth 0.64.2 → 0.66.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.
Files changed (36) hide show
  1. package/esm2020/public_api.mjs +1 -2
  2. package/esm2020/routing/guards/guest-only.guard.mjs +3 -3
  3. package/esm2020/routing/guards/member-only.guard.mjs +3 -3
  4. package/esm2020/state/effects/auth.effects.mjs +3 -2
  5. package/esm2020/state/effects/login.effects.mjs +3 -2
  6. package/esm2020/state/effects/register.effects.mjs +3 -2
  7. package/esm2020/state/effects/reset-password.effects.mjs +3 -2
  8. package/esm2020/state/injection-tokens/error-matcher.token.mjs +8 -0
  9. package/esm2020/state/injection-tokens/public_api.mjs +2 -1
  10. package/esm2020/state/testing/auth-testing.module.mjs +6 -6
  11. package/esm2020/state/testing/public_api.mjs +2 -2
  12. package/fesm2015/daffodil-auth-routing.mjs +2 -3
  13. package/fesm2015/daffodil-auth-routing.mjs.map +1 -1
  14. package/fesm2015/daffodil-auth-state-testing.mjs +6 -6
  15. package/fesm2015/daffodil-auth-state-testing.mjs.map +1 -1
  16. package/fesm2015/daffodil-auth-state.mjs +9 -3
  17. package/fesm2015/daffodil-auth-state.mjs.map +1 -1
  18. package/fesm2015/daffodil-auth.mjs +2 -9
  19. package/fesm2015/daffodil-auth.mjs.map +1 -1
  20. package/fesm2020/daffodil-auth-routing.mjs +1 -2
  21. package/fesm2020/daffodil-auth-routing.mjs.map +1 -1
  22. package/fesm2020/daffodil-auth-state-testing.mjs +6 -6
  23. package/fesm2020/daffodil-auth-state-testing.mjs.map +1 -1
  24. package/fesm2020/daffodil-auth-state.mjs +9 -3
  25. package/fesm2020/daffodil-auth-state.mjs.map +1 -1
  26. package/fesm2020/daffodil-auth.mjs +2 -9
  27. package/fesm2020/daffodil-auth.mjs.map +1 -1
  28. package/package.json +1 -1
  29. package/public_api.d.ts +0 -1
  30. package/state/injection-tokens/public_api.d.ts +1 -0
  31. package/state/testing/auth-testing.module.d.ts +4 -4
  32. package/state/testing/public_api.d.ts +1 -1
  33. package/esm2020/injection-tokens/error-matcher.token.mjs +0 -8
  34. package/esm2020/injection-tokens/public_api.mjs +0 -2
  35. package/injection-tokens/public_api.d.ts +0 -1
  36. /package/{injection-tokens → state/injection-tokens}/error-matcher.token.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { daffOperationInitialState, daffOperationFailed, daffCompleteOperation, daffStartResolution, daffStartMutation, daffOperationStateSelectorFactory, daffComposeReducers } from '@daffodil/core/state';
1
+ import { daffOperationInitialState, daffOperationFailed, daffCompleteOperation, daffStartResolution, daffStartMutation, daffOperationStateSelectorFactory, daffTransformErrorToStateError, daffComposeReducers } from '@daffodil/core/state';
2
2
  import * as i0 from '@angular/core';
3
3
  import { InjectionToken, Injectable, inject, Inject, NgModule } from '@angular/core';
4
4
  import * as i1 from '@ngrx/store';
@@ -7,7 +7,7 @@ import * as i1$1 from '@ngrx/effects';
7
7
  import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
8
8
  import { combineLatest, of, EMPTY, iif, defer } from 'rxjs';
9
9
  import * as i2$1 from '@daffodil/auth';
10
- import { DAFF_AUTH_ERROR_MATCHER, DaffAuthStorageService } from '@daffodil/auth';
10
+ import { DaffAuthStorageService } from '@daffodil/auth';
11
11
  import { switchMap, map, catchError, repeat, filter, tap } from 'rxjs/operators';
12
12
  import * as i2 from '@daffodil/auth/driver';
13
13
  import { DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES, DaffLoginDriver, DaffRegisterDriver, DaffResetPasswordDriver } from '@daffodil/auth/driver';
@@ -582,6 +582,12 @@ function daffAuthProvideUnauthenticatedHooks(...hooks) {
582
582
  }));
583
583
  }
584
584
 
585
+ /**
586
+ * Transforms `DaffError`s into `DaffStateError`s before they are serialized into state.
587
+ * Can be used to further refine Daffodil errors into more specific app errors.
588
+ */
589
+ const DAFF_AUTH_ERROR_MATCHER = new InjectionToken('DAFF_AUTH_ERROR_MATCHER', { factory: () => daffTransformErrorToStateError });
590
+
585
591
  /**
586
592
  * An internal token to hold the unauthenticated hook.
587
593
  * Combines the multi provided hooks into a single function.
@@ -843,5 +849,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
843
849
  * Generated bundle index. Do not edit.
844
850
  */
845
851
 
846
- export { DAFF_AUTH_EXTRA_REDUCERS, DAFF_AUTH_STATE_CONFIG, DAFF_AUTH_STORE_FEATURE_KEY, DAFF_AUTH_UNAUTHENTICATED_HOOKS, DaffAuthActionTypes, DaffAuthCheck, DaffAuthCheckFailure, DaffAuthCheckSuccess, DaffAuthFacade, DaffAuthGuardLogout, DaffAuthLogin, DaffAuthLoginActionTypes, DaffAuthLoginFacade, DaffAuthLoginFailure, DaffAuthLoginSuccess, DaffAuthLogout, DaffAuthLogoutFailure, DaffAuthLogoutSuccess, DaffAuthRegister, DaffAuthRegisterActionTypes, DaffAuthRegisterFacade, DaffAuthRegisterFailure, DaffAuthRegisterSuccess, DaffAuthResetPasswordActionTypes, DaffAuthResetPasswordFacade, DaffAuthResetToUnauthenticated, DaffAuthServerSide, DaffAuthStateModule, DaffAuthStorageFailure, DaffResetPassword, DaffResetPasswordFailure, DaffResetPasswordLanding, DaffResetPasswordSuccess, DaffSendResetEmail, DaffSendResetEmailFailure, DaffSendResetEmailSuccess, daffAuthInitialState, daffAuthLoginInitialState, daffAuthLoginReducer, daffAuthLoginSelectorFactory, daffAuthProvideExtraReducers, daffAuthProvideUnauthenticatedHooks, daffAuthReducer, daffAuthReducers, daffAuthRegisterInitialState, daffAuthRegisterReducer, daffAuthRegisterSelectorFactory, daffAuthResetPasswordInitialState, daffAuthResetPasswordReducer, daffAuthResetPasswordSelectorFactory, daffAuthSelectorFactory, daffAuthStateDefaultConfig, getDaffAuthSelectors, provideDaffAuthStateConfig };
852
+ export { DAFF_AUTH_ERROR_MATCHER, DAFF_AUTH_EXTRA_REDUCERS, DAFF_AUTH_STATE_CONFIG, DAFF_AUTH_STORE_FEATURE_KEY, DAFF_AUTH_UNAUTHENTICATED_HOOKS, DaffAuthActionTypes, DaffAuthCheck, DaffAuthCheckFailure, DaffAuthCheckSuccess, DaffAuthFacade, DaffAuthGuardLogout, DaffAuthLogin, DaffAuthLoginActionTypes, DaffAuthLoginFacade, DaffAuthLoginFailure, DaffAuthLoginSuccess, DaffAuthLogout, DaffAuthLogoutFailure, DaffAuthLogoutSuccess, DaffAuthRegister, DaffAuthRegisterActionTypes, DaffAuthRegisterFacade, DaffAuthRegisterFailure, DaffAuthRegisterSuccess, DaffAuthResetPasswordActionTypes, DaffAuthResetPasswordFacade, DaffAuthResetToUnauthenticated, DaffAuthServerSide, DaffAuthStateModule, DaffAuthStorageFailure, DaffResetPassword, DaffResetPasswordFailure, DaffResetPasswordLanding, DaffResetPasswordSuccess, DaffSendResetEmail, DaffSendResetEmailFailure, DaffSendResetEmailSuccess, daffAuthInitialState, daffAuthLoginInitialState, daffAuthLoginReducer, daffAuthLoginSelectorFactory, daffAuthProvideExtraReducers, daffAuthProvideUnauthenticatedHooks, daffAuthReducer, daffAuthReducers, daffAuthRegisterInitialState, daffAuthRegisterReducer, daffAuthRegisterSelectorFactory, daffAuthResetPasswordInitialState, daffAuthResetPasswordReducer, daffAuthResetPasswordSelectorFactory, daffAuthSelectorFactory, daffAuthStateDefaultConfig, getDaffAuthSelectors, provideDaffAuthStateConfig };
847
853
  //# sourceMappingURL=daffodil-auth-state.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-auth-state.mjs","sources":["../../../libs/auth/state/src/actions/auth.actions.ts","../../../libs/auth/state/src/actions/login.actions.ts","../../../libs/auth/state/src/actions/register.actions.ts","../../../libs/auth/state/src/actions/reset-password.actions.ts","../../../libs/auth/state/src/reducers/auth/auth-initial-state.ts","../../../libs/auth/state/src/reducers/auth/auth.reducer.ts","../../../libs/auth/state/src/reducers/login/login-initial-state.ts","../../../libs/auth/state/src/reducers/login/login.reducer.ts","../../../libs/auth/state/src/reducers/register/register-initial-state.ts","../../../libs/auth/state/src/reducers/register/register.reducer.ts","../../../libs/auth/state/src/reducers/reset-password/initial-state.ts","../../../libs/auth/state/src/reducers/reset-password/reducer.ts","../../../libs/auth/state/src/reducers/token/extra.token.ts","../../../libs/auth/state/src/reducers/auth-store-feature-key.ts","../../../libs/auth/state/src/reducers/auth-reducers.ts","../../../libs/auth/state/src/selectors/auth-feature.selector.ts","../../../libs/auth/state/src/selectors/auth/auth.selector.ts","../../../libs/auth/state/src/selectors/login/login.selector.ts","../../../libs/auth/state/src/selectors/register/register.selector.ts","../../../libs/auth/state/src/selectors/reset-password/selector.ts","../../../libs/auth/state/src/selectors/auth-all.selector.ts","../../../libs/auth/state/src/facades/auth/facade.ts","../../../libs/auth/state/src/facades/login/facade.ts","../../../libs/auth/state/src/facades/register/facade.ts","../../../libs/auth/state/src/facades/reset-password/facade.ts","../../../libs/auth/state/src/config/default.ts","../../../libs/auth/state/src/config/token.ts","../../../libs/auth/state/src/injection-tokens/unauthenticated/hooks.token.ts","../../../libs/auth/state/src/injection-tokens/unauthenticated/hook.token.ts","../../../libs/auth/state/src/effects/auth.effects.ts","../../../libs/auth/state/src/effects/login.effects.ts","../../../libs/auth/state/src/effects/register.effects.ts","../../../libs/auth/state/src/effects/reset-password.effects.ts","../../../libs/auth/state/src/reducers/token/reducers.token.ts","../../../libs/auth/state/src/auth-state.module.ts","../../../libs/auth/state/src/daffodil-auth-state.ts"],"sourcesContent":["import { Action } from '@ngrx/store';\n\nimport { DaffStateError } from '@daffodil/core/state';\n\nexport enum DaffAuthActionTypes {\n ResetToUnauthenticatedAction = '[@daffodil/auth] Reset To Unauthenticated Action',\n AuthStorageFailureAction = '[@daffodil/auth] Auth Storage Failure Action',\n AuthGuardLogoutAction = '[@daffodil/auth] Auth Guard Logout Action',\n AuthServerSideAction = '[@daffodil/auth] Auth Server Side Action',\n AuthCheckAction = '[@daffodil/auth] Auth Check Action',\n AuthCheckSuccessAction = '[@daffodil/auth] Auth Check Success Action',\n AuthCheckFailureAction = '[@daffodil/auth] Auth Check Failure Action',\n}\n\n/*\n * An action triggered when the authenicated status of the user is invalidated for some reason.\n * That reason could be a logout, auth token check failure, or an unauthorized error.\n */\nexport class DaffAuthResetToUnauthenticated implements Action {\n readonly type = DaffAuthActionTypes.ResetToUnauthenticatedAction;\n\n constructor(\n public reason: Action['type'],\n ) {}\n}\n\n/*\n * An action triggered upon a failed auth storage operation.\n */\nexport class DaffAuthStorageFailure implements Action {\n readonly type = DaffAuthActionTypes.AuthStorageFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/*\n * An action triggered when an auth token is cleared from storage by a routing guard.\n */\nexport class DaffAuthGuardLogout implements Action {\n readonly type = DaffAuthActionTypes.AuthGuardLogoutAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/*\n * An action triggered when an invalid operation is performed in the server environment.\n * A common example is trying to access the auth token from storage.\n */\nexport class DaffAuthServerSide implements Action {\n readonly type = DaffAuthActionTypes.AuthServerSideAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/**\n * An action triggered to initialize an auth check request.\n */\nexport class DaffAuthCheck implements Action {\n readonly type = DaffAuthActionTypes.AuthCheckAction;\n}\n\n/**\n * An action triggered upon a successful auth check.\n *\n * @param token - the customer access token\n */\nexport class DaffAuthCheckSuccess implements Action {\n readonly type = DaffAuthActionTypes.AuthCheckSuccessAction;\n}\n\n/**\n * An action triggered upon a failed auth check request.\n *\n * @param errorMessage - an error message\n */\nexport class DaffAuthCheckFailure implements Action {\n readonly type = DaffAuthActionTypes.AuthCheckFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\nexport type DaffAuthActions =\n | DaffAuthResetToUnauthenticated\n | DaffAuthStorageFailure\n | DaffAuthGuardLogout\n | DaffAuthServerSide\n | DaffAuthCheck\n | DaffAuthCheckSuccess\n | DaffAuthCheckFailure;\n","import { Action } from '@ngrx/store';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nexport enum DaffAuthLoginActionTypes {\n LoginAction = '[@daffodil/auth] Login Action',\n LoginSuccessAction = '[@daffodil/auth] Login Success Action',\n LoginFailureAction = '[@daffodil/auth] Login Failure Action',\n LogoutAction = '[@daffodil/auth] Logout Action',\n LogoutSuccessAction = '[@daffodil/auth] Logout Success Action',\n LogoutFailureAction = '[@daffodil/auth] Logout Failure Action',\n}\n\n/**\n * An action triggered to initialize a auth login request.\n */\nexport class DaffAuthLogin<T extends DaffLoginInfo = DaffLoginInfo> implements Action {\n readonly type = DaffAuthLoginActionTypes.LoginAction;\n\n constructor(public loginInfo: T) {}\n}\n\n/**\n * An action triggered upon a successful auth login.\n *\n * @param token - the customer access token\n */\nexport class DaffAuthLoginSuccess<T extends DaffAuthToken = DaffAuthToken> implements Action {\n readonly type = DaffAuthLoginActionTypes.LoginSuccessAction;\n\n constructor(public auth: T) {}\n}\n\n/**\n * An action triggered upon a failed auth login request.\n *\n * @param errorMessage - an error message\n */\nexport class DaffAuthLoginFailure implements Action {\n readonly type = DaffAuthLoginActionTypes.LoginFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/**\n * An action triggered to initialize a logout request.\n */\nexport class DaffAuthLogout implements Action {\n readonly type = DaffAuthLoginActionTypes.LogoutAction;\n}\n\n/**\n * An action triggered upon a successful logout.\n *\n * @param token - the customer access token\n */\nexport class DaffAuthLogoutSuccess implements Action {\n readonly type = DaffAuthLoginActionTypes.LogoutSuccessAction;\n}\n\n/**\n * An action triggered upon a failed logout request.\n *\n * @param errorMessage - an error message\n */\nexport class DaffAuthLogoutFailure implements Action {\n readonly type = DaffAuthLoginActionTypes.LogoutFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\nexport type DaffAuthLoginActions<\n T extends DaffLoginInfo = DaffLoginInfo,\n U extends DaffAuthToken = DaffAuthToken,\n> =\n | DaffAuthLogin<T>\n | DaffAuthLoginSuccess<U>\n | DaffAuthLoginFailure\n | DaffAuthLogout\n | DaffAuthLogoutSuccess\n | DaffAuthLogoutFailure;\n","import { Action } from '@ngrx/store';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nexport enum DaffAuthRegisterActionTypes {\n RegisterAction = '[@daffodil/auth] Register Action',\n RegisterSuccessAction = '[@daffodil/auth] Register Success Action',\n RegisterFailureAction = '[@daffodil/auth] Register Failure Action',\n}\n\n/**\n * An action triggered to initialize a auth register request.\n *\n * @param registration\n */\nexport class DaffAuthRegister<T extends DaffAccountRegistration = DaffAccountRegistration> implements Action {\n readonly type = DaffAuthRegisterActionTypes.RegisterAction;\n\n constructor(public registration: T, public autoLogin = true) {}\n}\n\n/**\n * An action triggered upon a successful auth register request.\n *\n * @param token - the customer access token\n */\nexport class DaffAuthRegisterSuccess implements Action {\n readonly type = DaffAuthRegisterActionTypes.RegisterSuccessAction;\n\n constructor(public token?: string) {}\n}\n\n/**\n * An action triggered upon a failed auth request.\n *\n * @param errorMessage - an error message\n */\nexport class DaffAuthRegisterFailure implements Action {\n readonly type = DaffAuthRegisterActionTypes.RegisterFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\nexport type DaffAuthRegisterActions<\n T extends DaffAccountRegistration = DaffAccountRegistration,\n> =\n | DaffAuthRegister<T>\n | DaffAuthRegisterSuccess\n | DaffAuthRegisterFailure;\n","import { Action } from '@ngrx/store';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nexport enum DaffAuthResetPasswordActionTypes {\n SendResetEmailAction = '[@daffodil/auth] Send Reset Email Action',\n SendResetEmailSuccessAction = '[@daffodil/auth] Send Reset Email Success Action',\n SendResetEmailFailureAction = '[@daffodil/auth] Send Reset Email Failure Action',\n ResetPasswordAction = '[@daffodil/auth] Reset Password Action',\n ResetPasswordSuccessAction = '[@daffodil/auth] Reset Password Success Action',\n ResetPasswordFailureAction = '[@daffodil/auth] Reset Password Failure Action',\n ResetPasswordLandingAction = '[@daffodil/auth] Reset Password Landing Action',\n}\n\n/**\n * An action triggered to send the specified customer an email to reset their password.\n */\nexport class DaffSendResetEmail implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.SendResetEmailAction;\n\n constructor(public email: string) {}\n}\n\n/**\n * An action triggered upon a successfully sent reset password email.\n */\nexport class DaffSendResetEmailSuccess implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.SendResetEmailSuccessAction;\n}\n\n/**\n * An action triggered upon a failure to send the reset password email.\n *\n * @param errorMessage - an error message\n */\nexport class DaffSendResetEmailFailure implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.SendResetEmailFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/**\n * An action triggered to initialize a logout request.\n */\nexport class DaffResetPassword<T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo> implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.ResetPasswordAction;\n\n constructor(public info: T, public autoLogin = true) {}\n}\n\n/**\n * An action triggered upon a successful logout.\n */\nexport class DaffResetPasswordSuccess implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.ResetPasswordSuccessAction;\n\n constructor(public token?: string) {}\n}\n\n/**\n * An action triggered upon a failed logout request.\n *\n * @param errorMessage - an error message\n */\nexport class DaffResetPasswordFailure implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.ResetPasswordFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/**\n * An action triggered upon the user navigating to the reset password page from the link in their email.\n *\n * @param token - The token with which the password can be reset\n */\nexport class DaffResetPasswordLanding implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.ResetPasswordLandingAction;\n\n constructor(public token: DaffAuthResetPasswordInfo['token']) {}\n}\n\nexport type DaffAuthResetPasswordActions<\n T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo,\n> =\n | DaffSendResetEmail\n | DaffSendResetEmailSuccess\n | DaffSendResetEmailFailure\n | DaffResetPassword<T>\n | DaffResetPasswordSuccess\n | DaffResetPasswordFailure\n | DaffResetPasswordLanding;\n","import { daffOperationInitialState } from '@daffodil/core/state';\n\nimport { DaffAuthReducerState } from './auth-reducer-state.interface';\n\nexport const daffAuthInitialState: DaffAuthReducerState = {\n ...daffOperationInitialState,\n loggedIn: false,\n};\n","import {\n daffCompleteOperation,\n daffOperationFailed,\n daffStartResolution,\n} from '@daffodil/core/state';\n\nimport { daffAuthInitialState } from './auth-initial-state';\nimport { DaffAuthReducerState } from './auth-reducer-state.interface';\nimport {\n DaffAuthActionTypes,\n DaffAuthActions,\n DaffAuthLoginActionTypes,\n DaffAuthLoginActions,\n DaffAuthRegisterActionTypes,\n DaffAuthRegisterSuccess,\n DaffAuthResetPasswordActionTypes,\n DaffAuthResetPasswordActions,\n} from '../../actions/public_api';\n\nexport function daffAuthReducer(\n state = daffAuthInitialState,\n action: DaffAuthActions | DaffAuthLoginActions | DaffAuthRegisterSuccess | DaffAuthResetPasswordActions,\n): DaffAuthReducerState {\n switch (action.type) {\n case DaffAuthActionTypes.AuthCheckAction:\n return daffStartResolution(state);\n\n case DaffAuthActionTypes.AuthCheckSuccessAction:\n return {\n ...daffCompleteOperation(state),\n loggedIn: true,\n };\n\n case DaffAuthActionTypes.AuthCheckFailureAction:\n case DaffAuthActionTypes.AuthGuardLogoutAction:\n return {\n ...daffOperationFailed([action.errorMessage], state),\n loggedIn: false,\n };\n\n case DaffAuthActionTypes.AuthServerSideAction:\n case DaffAuthActionTypes.AuthStorageFailureAction:\n return daffOperationFailed([action.errorMessage], state);\n\n case DaffAuthLoginActionTypes.LoginSuccessAction:\n return {\n ...state,\n loggedIn: true,\n };\n\n case DaffAuthRegisterActionTypes.RegisterSuccessAction:\n case DaffAuthResetPasswordActionTypes.ResetPasswordSuccessAction:\n return action.token ? {\n ...state,\n loggedIn: true,\n } : state;\n\n case DaffAuthLoginActionTypes.LogoutSuccessAction:\n return {\n ...state,\n loggedIn: false,\n };\n\n default:\n return state;\n }\n}\n","import { daffOperationInitialState } from '@daffodil/core/state';\n\nimport { DaffAuthLoginReducerState } from './login-reducer-state.interface';\n\nexport const daffAuthLoginInitialState: DaffAuthLoginReducerState = daffOperationInitialState;\n","import {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\nimport {\n daffCompleteOperation,\n daffOperationFailed,\n daffStartMutation,\n} from '@daffodil/core/state';\n\nimport { daffAuthLoginInitialState } from './login-initial-state';\nimport { DaffAuthLoginReducerState } from './login-reducer-state.interface';\nimport {\n DaffAuthLoginActionTypes,\n DaffAuthLoginActions,\n} from '../../actions/public_api';\n\nexport function daffAuthLoginReducer<\n T extends DaffLoginInfo,\n U extends DaffAuthToken,\n>(\n state = daffAuthLoginInitialState,\n action: DaffAuthLoginActions<T, U>,\n): DaffAuthLoginReducerState {\n switch (action.type) {\n case DaffAuthLoginActionTypes.LoginAction:\n case DaffAuthLoginActionTypes.LogoutAction:\n return daffStartMutation(state);\n\n case DaffAuthLoginActionTypes.LoginSuccessAction:\n case DaffAuthLoginActionTypes.LogoutSuccessAction:\n return daffCompleteOperation(state);\n\n case DaffAuthLoginActionTypes.LoginFailureAction:\n case DaffAuthLoginActionTypes.LogoutFailureAction:\n return daffOperationFailed([action.errorMessage], state);\n\n default:\n return state;\n }\n}\n","import { daffOperationInitialState } from '@daffodil/core/state';\n\nimport { DaffAuthRegisterReducerState } from './register-reducer-state.interface';\n\nexport const daffAuthRegisterInitialState: DaffAuthRegisterReducerState = daffOperationInitialState;\n","import { DaffAccountRegistration } from '@daffodil/auth';\nimport {\n daffCompleteOperation,\n daffOperationFailed,\n daffStartMutation,\n} from '@daffodil/core/state';\n\nimport { daffAuthRegisterInitialState } from './register-initial-state';\nimport { DaffAuthRegisterReducerState } from './register-reducer-state.interface';\nimport {\n DaffAuthRegisterActionTypes,\n DaffAuthRegisterActions,\n} from '../../actions/public_api';\n\nexport function daffAuthRegisterReducer<\n T extends DaffAccountRegistration,\n>(\n state = daffAuthRegisterInitialState,\n action: DaffAuthRegisterActions<T>,\n): DaffAuthRegisterReducerState {\n switch (action.type) {\n case DaffAuthRegisterActionTypes.RegisterAction:\n return daffStartMutation(state);\n\n case DaffAuthRegisterActionTypes.RegisterSuccessAction:\n return daffCompleteOperation(state);\n\n case DaffAuthRegisterActionTypes.RegisterFailureAction:\n return daffOperationFailed([action.errorMessage], state);\n\n default:\n return state;\n }\n}\n","import { daffOperationInitialState } from '@daffodil/core/state';\n\nimport { DaffAuthResetPasswordReducerState } from './state.interface';\n\nexport const daffAuthResetPasswordInitialState: DaffAuthResetPasswordReducerState = {\n ...daffOperationInitialState,\n token: null,\n};\n","import { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport {\n daffCompleteOperation,\n daffOperationFailed,\n daffStartMutation,\n} from '@daffodil/core/state';\n\nimport { daffAuthResetPasswordInitialState } from './initial-state';\nimport { DaffAuthResetPasswordReducerState } from './state.interface';\nimport {\n DaffAuthResetPasswordActionTypes,\n DaffAuthResetPasswordActions,\n} from '../../actions/public_api';\n\nexport function daffAuthResetPasswordReducer<\n T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo,\n>(\n state = daffAuthResetPasswordInitialState,\n action: DaffAuthResetPasswordActions<T>,\n): DaffAuthResetPasswordReducerState {\n switch (action.type) {\n case DaffAuthResetPasswordActionTypes.ResetPasswordAction:\n case DaffAuthResetPasswordActionTypes.SendResetEmailAction:\n return daffStartMutation(state);\n\n case DaffAuthResetPasswordActionTypes.ResetPasswordSuccessAction:\n case DaffAuthResetPasswordActionTypes.SendResetEmailSuccessAction:\n return daffCompleteOperation(state);\n\n case DaffAuthResetPasswordActionTypes.ResetPasswordFailureAction:\n case DaffAuthResetPasswordActionTypes.SendResetEmailFailureAction:\n return daffOperationFailed([action.errorMessage], state);\n\n case DaffAuthResetPasswordActionTypes.ResetPasswordLandingAction:\n return {\n ...state,\n token: action.token,\n };\n\n default:\n return state;\n }\n}\n","import {\n InjectionToken,\n Provider,\n} from '@angular/core';\nimport { ActionReducer } from '@ngrx/store';\n\nimport { DaffAuthFeatureState } from '../auth-feature-state.interface';\n\n/**\n * A token to hold the injectable extra reducers.\n *\n * Prefer using {@link daffAuthProvideExtraReducers}.\n */\nexport const DAFF_AUTH_EXTRA_REDUCERS = new InjectionToken<ActionReducer<DaffAuthFeatureState>[]>(\n 'DAFF_AUTH_EXTRA_REDUCERS',\n { factory: () => []},\n);\n\n/**\n * Provides additional reducers that run after the standard Daffodil auth reducers.\n *\n * ```ts\n * providers: [\n * ...daffAuthProvideExtraReducers(\n * myReducer1,\n * myReducer2\n * )\n * ]\n * ```\n */\nexport function daffAuthProvideExtraReducers(\n ...reducers: ActionReducer<DaffAuthFeatureState>[]\n): Provider[] {\n return reducers.map(reducer => ({\n provide: DAFF_AUTH_EXTRA_REDUCERS,\n useValue: reducer,\n multi: true,\n }));\n}\n","export const DAFF_AUTH_STORE_FEATURE_KEY = 'daffAuth';\n","import { ActionReducerMap } from '@ngrx/store';\n\nimport { daffAuthReducer } from './auth/public_api';\nimport { DaffAuthFeatureState } from './auth-feature-state.interface';\nimport { daffAuthLoginReducer } from './login/public_api';\nimport { daffAuthRegisterReducer } from './register/public_api';\nimport { daffAuthResetPasswordReducer } from './reset-password/public_api';\n\nexport const daffAuthReducers: ActionReducerMap<DaffAuthFeatureState> = {\n auth: daffAuthReducer,\n login: daffAuthLoginReducer,\n register: daffAuthRegisterReducer,\n resetPassword: daffAuthResetPasswordReducer,\n};\n","import {\n createFeatureSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport {\n DaffAuthFeatureState,\n DAFF_AUTH_STORE_FEATURE_KEY,\n} from '../reducers/public_api';\n\n/**\n * Feature State Selector\n */\nexport const getDaffAuthFeatureStateSelector = (() => {\n let cache;\n return (): MemoizedSelector<Record<string, any>, DaffAuthFeatureState> =>\n cache = cache || createFeatureSelector<DaffAuthFeatureState>(DAFF_AUTH_STORE_FEATURE_KEY);\n})();\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport {\n daffOperationStateSelectorFactory,\n DaffOperationStateSelectors,\n} from '@daffodil/core/state';\n\nimport {\n DaffAuthReducerState,\n DaffAuthStateRootSlice,\n} from '../../reducers/public_api';\nimport { getDaffAuthFeatureStateSelector } from '../auth-feature.selector';\n\nexport interface AuthSelectors extends DaffOperationStateSelectors<DaffAuthStateRootSlice, DaffAuthReducerState> {\n selectAuthState: MemoizedSelector<DaffAuthStateRootSlice, DaffAuthReducerState>;\n selectAuthLoggedIn: MemoizedSelector<DaffAuthStateRootSlice, boolean>;\n}\n\nconst createAuthSelectors = () => {\n const selectAuthState = createSelector(\n getDaffAuthFeatureStateSelector(),\n state => state.auth,\n );\n\n const selectAuthLoggedIn = createSelector(\n selectAuthState,\n state => state.loggedIn,\n );\n\n return {\n ...daffOperationStateSelectorFactory<DaffAuthStateRootSlice, DaffAuthReducerState>(selectAuthState),\n selectAuthState,\n selectAuthLoggedIn,\n };\n};\n\nexport const daffAuthSelectorFactory = (() => {\n let cache;\n return (): AuthSelectors =>\n cache = cache || createAuthSelectors();\n})();\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport {\n daffOperationStateSelectorFactory,\n DaffOperationStateSelectors,\n DaffStateError,\n} from '@daffodil/core/state';\n\nimport {\n DaffAuthLoginReducerState,\n DaffAuthStateRootSlice,\n} from '../../reducers/public_api';\nimport { getDaffAuthFeatureStateSelector } from '../auth-feature.selector';\n\nexport interface DaffAuthLoginSelectors extends DaffOperationStateSelectors<DaffAuthStateRootSlice, DaffAuthLoginReducerState> {\n selectAuthLoginState: MemoizedSelector<DaffAuthStateRootSlice, DaffAuthLoginReducerState>;\n}\n\nconst createLoginSelectors = () => {\n const selectAuthLoginState = createSelector(\n getDaffAuthFeatureStateSelector(),\n state => state.login,\n );\n\n\n return {\n ...daffOperationStateSelectorFactory<DaffAuthStateRootSlice, DaffAuthLoginReducerState>(selectAuthLoginState),\n selectAuthLoginState,\n };\n};\n\nexport const daffAuthLoginSelectorFactory = (() => {\n let cache;\n return (): DaffAuthLoginSelectors =>\n cache = cache || createLoginSelectors();\n})();\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport {\n daffOperationStateSelectorFactory,\n DaffOperationStateSelectors,\n} from '@daffodil/core/state';\n\nimport {\n DaffAuthRegisterReducerState,\n DaffAuthStateRootSlice,\n} from '../../reducers/public_api';\nimport { getDaffAuthFeatureStateSelector } from '../auth-feature.selector';\n\nexport interface DaffAuthRegisterSelectors extends DaffOperationStateSelectors<DaffAuthStateRootSlice, DaffAuthRegisterReducerState> {\n selectAuthRegisterState: MemoizedSelector<DaffAuthStateRootSlice, DaffAuthRegisterReducerState>;\n}\n\nconst createRegisterSelectors = () => {\n const selectAuthRegisterState = createSelector(\n getDaffAuthFeatureStateSelector(),\n state => state.register,\n );\n\n return {\n ...daffOperationStateSelectorFactory<DaffAuthStateRootSlice, DaffAuthRegisterReducerState>(selectAuthRegisterState),\n selectAuthRegisterState,\n };\n};\n\nexport const daffAuthRegisterSelectorFactory = (() => {\n let cache;\n return (): DaffAuthRegisterSelectors =>\n cache = cache || createRegisterSelectors();\n})();\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport {\n daffOperationStateSelectorFactory,\n DaffOperationStateSelectors,\n} from '@daffodil/core/state';\n\nimport {\n DaffAuthResetPasswordReducerState,\n DaffAuthStateRootSlice,\n} from '../../reducers/public_api';\nimport { getDaffAuthFeatureStateSelector } from '../auth-feature.selector';\n\nexport interface DaffAuthResetPasswordSelectors extends DaffOperationStateSelectors<DaffAuthStateRootSlice, DaffAuthResetPasswordReducerState> {\n selectAuthResetPasswordState: MemoizedSelector<DaffAuthStateRootSlice, DaffAuthResetPasswordReducerState>;\n selectAuthResetPasswordToken: MemoizedSelector<DaffAuthStateRootSlice, DaffAuthResetPasswordInfo['token']>;\n}\n\nconst createResetPasswordSelectors = (): DaffAuthResetPasswordSelectors => {\n const selectAuthResetPasswordState = createSelector(\n getDaffAuthFeatureStateSelector(),\n state => state.resetPassword,\n );\n\n const selectAuthResetPasswordToken = createSelector(\n selectAuthResetPasswordState,\n state => state.token,\n );\n\n return {\n ...daffOperationStateSelectorFactory<DaffAuthStateRootSlice, DaffAuthResetPasswordReducerState>(selectAuthResetPasswordState),\n selectAuthResetPasswordState,\n selectAuthResetPasswordToken,\n };\n};\n\nexport const daffAuthResetPasswordSelectorFactory = (() => {\n let cache;\n return (): DaffAuthResetPasswordSelectors =>\n cache = cache || createResetPasswordSelectors();\n})();\n","import { MemoizedSelector } from '@ngrx/store';\n\nimport {\n daffAuthSelectorFactory,\n AuthSelectors,\n} from './auth/auth.selector';\nimport { getDaffAuthFeatureStateSelector } from './auth-feature.selector';\nimport {\n daffAuthLoginSelectorFactory,\n DaffAuthLoginSelectors,\n} from './login/login.selector';\nimport {\n daffAuthRegisterSelectorFactory,\n DaffAuthRegisterSelectors,\n} from './register/register.selector';\nimport {\n DaffAuthResetPasswordSelectors,\n daffAuthResetPasswordSelectorFactory,\n} from './reset-password/selector';\nimport { DaffAuthFeatureState } from '../reducers/public_api';\n\nexport interface DaffAuthSelectors extends\n DaffAuthRegisterSelectors,\n DaffAuthLoginSelectors,\n DaffAuthResetPasswordSelectors,\n AuthSelectors {\n selectAuthFeatureState: MemoizedSelector<Record<string, any>, DaffAuthFeatureState>;\n}\n\nexport const getDaffAuthSelectors = (() => {\n let cache;\n return (): DaffAuthSelectors =>\n cache = cache || {\n ...daffAuthSelectorFactory(),\n ...daffAuthLoginSelectorFactory(),\n ...daffAuthRegisterSelectorFactory(),\n ...daffAuthResetPasswordSelectorFactory(),\n selectAuthFeatureState: getDaffAuthFeatureStateSelector(),\n };\n})();\n","import { Injectable } from '@angular/core';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthFacadeInterface } from './facade.interface';\nimport { DaffAuthStateRootSlice } from '../../reducers/public_api';\nimport { daffAuthSelectorFactory } from '../../selectors/auth/auth.selector';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthFacade implements DaffAuthFacadeInterface {\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n loggedIn$: Observable<boolean>;\n\n constructor(private store: Store<DaffAuthStateRootSlice>) {\n const {\n selectLoading,\n selectErrors,\n selectAuthLoggedIn,\n } = daffAuthSelectorFactory();\n\n this.loading$ = this.store.pipe(select(selectLoading));\n this.errors$ = this.store.pipe(select(selectErrors));\n this.loggedIn$ = this.store.pipe(select(selectAuthLoggedIn));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthLoginFacadeInterface } from './facade.interface';\nimport { DaffAuthStateRootSlice } from '../../reducers/public_api';\nimport { daffAuthLoginSelectorFactory } from '../../selectors/login/login.selector';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthLoginFacade implements DaffAuthLoginFacadeInterface {\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n\n constructor(private store: Store<DaffAuthStateRootSlice>) {\n const {\n selectLoading,\n selectErrors,\n } = daffAuthLoginSelectorFactory();\n\n this.loading$ = this.store.pipe(select(selectLoading));\n this.errors$ = this.store.pipe(select(selectErrors));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthRegisterFacadeInterface } from './facade.interface';\nimport { DaffAuthStateRootSlice } from '../../reducers/public_api';\nimport { daffAuthRegisterSelectorFactory } from '../../selectors/register/register.selector';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthRegisterFacade implements DaffAuthRegisterFacadeInterface {\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n\n constructor(private store: Store<DaffAuthStateRootSlice>) {\n const {\n selectLoading,\n selectErrors,\n } = daffAuthRegisterSelectorFactory();\n\n this.loading$ = this.store.pipe(select(selectLoading));\n this.errors$ = this.store.pipe(select(selectErrors));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthResetPasswordFacadeInterface } from './facade.interface';\nimport { DaffAuthStateRootSlice } from '../../reducers/public_api';\nimport { daffAuthResetPasswordSelectorFactory } from '../../selectors/reset-password/selector';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthResetPasswordFacade implements DaffAuthResetPasswordFacadeInterface {\n token$: Observable<DaffAuthResetPasswordInfo['token']>;\n\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n\n constructor(private store: Store<DaffAuthStateRootSlice>) {\n const {\n selectLoading,\n selectErrors,\n selectAuthResetPasswordToken,\n } = daffAuthResetPasswordSelectorFactory();\n\n this.token$ = this.store.pipe(select(selectAuthResetPasswordToken));\n\n this.loading$ = this.store.pipe(select(selectLoading));\n this.errors$ = this.store.pipe(select(selectErrors));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import { DaffAuthStateConfig } from './type';\n\nconst TWENTY_MINUTES = 1.2e6;\n\nexport const daffAuthStateDefaultConfig: DaffAuthStateConfig = {\n checkInterval: TWENTY_MINUTES,\n};\n","import {\n InjectionToken,\n ValueProvider,\n} from '@angular/core';\n\nimport { daffAuthStateDefaultConfig } from './default';\nimport { DaffAuthStateConfig } from './type';\n\nexport const DAFF_AUTH_STATE_CONFIG = new InjectionToken('DAFF_AUTH_STATE_CONFIG', { factory: () => daffAuthStateDefaultConfig });\n\nexport const provideDaffAuthStateConfig = (config: DaffAuthStateConfig): ValueProvider => ({\n provide: DAFF_AUTH_STATE_CONFIG,\n useValue: config,\n});\n","import {\n InjectionToken,\n Provider,\n} from '@angular/core';\n\nimport { DaffAuthUnauthenticatedHook } from './hook.type';\n\n/**\n * A token to hold the unauthenticated hooks.\n * See {@link DaffAuthUnauthenticatedHook}.\n *\n * Prefer using {@link daffAuthProvideUnauthenticatedHooks}.\n */\nexport const DAFF_AUTH_UNAUTHENTICATED_HOOKS = new InjectionToken<DaffAuthUnauthenticatedHook[]>(\n 'DAFF_AUTH_UNAUTHENTICATED_HOOKS',\n { factory: () => []},\n);\n\n/**\n * Provides {@link DAFF_AUTH_UNAUTHENTICATED_HOOKS}.\n *\n * ```ts\n * providers: [\n * ...daffAuthProvideUnauthenticatedHooks(\n * myReducer1,\n * myReducer2\n * )\n * ]\n * ```\n */\nexport function daffAuthProvideUnauthenticatedHooks(\n ...hooks: DaffAuthUnauthenticatedHook[]\n): Provider[] {\n return hooks.map(hook => ({\n provide: DAFF_AUTH_UNAUTHENTICATED_HOOKS,\n useValue: hook,\n multi: true,\n }));\n}\n","import {\n inject,\n InjectionToken,\n} from '@angular/core';\nimport { combineLatest } from 'rxjs';\n\nimport { DaffAuthUnauthenticatedHook } from './hook.type';\nimport { DAFF_AUTH_UNAUTHENTICATED_HOOKS } from './hooks.token';\n\n/**\n * An internal token to hold the unauthenticated hook.\n * Combines the multi provided hooks into a single function.\n *\n * @docs-private\n */\nexport const DAFF_AUTH_UNAUTHENTICATED_HOOK = new InjectionToken<DaffAuthUnauthenticatedHook>(\n 'DAFF_AUTH_UNAUTHENTICATED_HOOK',\n {\n factory: () => {\n const hooks = inject(DAFF_AUTH_UNAUTHENTICATED_HOOKS);\n return (action) => combineLatest(hooks.map((hook) => hook(action)));\n },\n },\n);\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n of,\n EMPTY,\n} from 'rxjs';\nimport {\n switchMap,\n catchError,\n map,\n repeat,\n filter,\n tap,\n} from 'rxjs/operators';\n\nimport {\n DaffAuthStorageService,\n DAFF_AUTH_ERROR_MATCHER,\n} from '@daffodil/auth';\nimport {\n DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES,\n DaffAuthDriverTokenCheck,\n} from '@daffodil/auth/driver';\nimport {\n DaffError,\n DaffServerSideStorageError,\n DaffStorageServiceError,\n} from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\nimport {\n DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE,\n DaffDriverHttpClientCacheServiceInterface,\n} from '@daffodil/driver';\n\nimport {\n DaffAuthActionTypes,\n DaffAuthCheckSuccess,\n DaffAuthCheckFailure,\n DaffAuthCheck,\n DaffAuthStorageFailure,\n DaffAuthServerSide,\n DaffAuthLoginActionTypes,\n DaffAuthActions,\n DaffAuthLoginActions,\n DaffAuthResetToUnauthenticated,\n} from '../actions/public_api';\nimport {\n DaffAuthStateConfig,\n DAFF_AUTH_STATE_CONFIG,\n} from '../config/public_api';\nimport { DaffAuthUnauthenticatedHook } from '../injection-tokens/public_api';\nimport { DAFF_AUTH_UNAUTHENTICATED_HOOK } from '../injection-tokens/unauthenticated/hook.token';\n\n@Injectable()\nexport class DaffAuthEffects {\n constructor(\n private actions$: Actions<DaffAuthActions | DaffAuthLoginActions>,\n private tokenCheck: DaffAuthDriverTokenCheck,\n @Inject(DAFF_AUTH_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n private storage: DaffAuthStorageService,\n @Inject(DAFF_AUTH_STATE_CONFIG) private config: DaffAuthStateConfig,\n @Inject(DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE) private clientCache: DaffDriverHttpClientCacheServiceInterface,\n @Inject(DAFF_AUTH_UNAUTHENTICATED_HOOK) private unauthenticatedHook: DaffAuthUnauthenticatedHook,\n ) {}\n\n check$ = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthActionTypes.AuthCheckAction),\n switchMap((action) =>\n this.tokenCheck.check().pipe(\n map(() => new DaffAuthCheckSuccess()),\n catchError((error: DaffError) => of(new DaffAuthCheckFailure(this.errorMatcher(error)))),\n ),\n ),\n ));\n\n // this needs to be defined after `check$` or else the driver call won't be run\n authCheckInterval$ = createEffect(() => of(new DaffAuthCheck()).pipe(\n repeat({ delay: this.config.checkInterval }),\n filter(() => !!this.storage.getAuthToken()),\n catchError((error: Error) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(new DaffAuthServerSide(this.errorMatcher(error)));\n\n case error instanceof DaffStorageServiceError:\n return of(new DaffAuthStorageFailure(this.errorMatcher(error)));\n\n default:\n return EMPTY;\n }\n }),\n ));\n\n resetToUnauthenticated$ = createEffect(() => this.actions$.pipe(\n ofType(\n DaffAuthActionTypes.AuthCheckFailureAction,\n DaffAuthActionTypes.AuthGuardLogoutAction,\n DaffAuthLoginActionTypes.LogoutSuccessAction,\n ),\n filter((action) => {\n // if the auth check failure is for any reason other than auth failure,\n // such as a network failure, don't reset\n if (\n action.type === DaffAuthActionTypes.AuthCheckFailureAction\n && !DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES[action.errorMessage.code]\n ) {\n return false;\n }\n\n return true;\n }),\n map((action) => new DaffAuthResetToUnauthenticated(action.type)),\n ));\n\n clearClientCache$ = createEffect(() => this.actions$.pipe(\n ofType(\n DaffAuthActionTypes.ResetToUnauthenticatedAction,\n ),\n switchMap((action) => this.unauthenticatedHook(action.reason)),\n tap(() => {\n this.clientCache.reset();\n }),\n switchMap(() => EMPTY),\n ), { dispatch: false });\n}\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport { of } from 'rxjs';\nimport {\n switchMap,\n map,\n catchError,\n tap,\n} from 'rxjs/operators';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n DAFF_AUTH_ERROR_MATCHER,\n DaffAuthStorageService,\n} from '@daffodil/auth';\nimport {\n DaffLoginDriver,\n DaffLoginServiceInterface,\n} from '@daffodil/auth/driver';\nimport {\n DaffError,\n DaffServerSideStorageError,\n DaffStorageServiceError,\n} from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\n\nimport {\n DaffAuthLoginActionTypes,\n DaffAuthLoginSuccess,\n DaffAuthLoginFailure,\n DaffAuthLogoutSuccess,\n DaffAuthLogoutFailure,\n DaffAuthLogout,\n DaffAuthServerSide,\n DaffAuthLoginActions,\n DaffAuthStorageFailure,\n} from '../actions/public_api';\n\n@Injectable()\nexport class DaffAuthLoginEffects<\n T extends DaffLoginInfo = DaffLoginInfo,\n U extends DaffAuthToken = DaffAuthToken,\n> {\n constructor(\n private actions$: Actions<DaffAuthLoginActions<T, U>>,\n @Inject(DaffLoginDriver) private loginDriver: DaffLoginServiceInterface<T, U>,\n @Inject(DAFF_AUTH_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n private storage: DaffAuthStorageService,\n ) {}\n\n login$ = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthLoginActionTypes.LoginAction),\n switchMap((action) =>\n this.loginDriver.login(action.loginInfo)\n .pipe(\n map((resp) => new DaffAuthLoginSuccess<U>(resp)),\n tap((success) => this.storage.setAuthToken(success.auth.token)),\n catchError((error: DaffError) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(new DaffAuthServerSide(this.errorMatcher(error)));\n case error instanceof DaffStorageServiceError:\n default:\n return of(new DaffAuthLoginFailure(this.errorMatcher(error)));\n }\n }),\n ),\n ),\n ));\n\n logout$ = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthLoginActionTypes.LogoutAction),\n switchMap((action: DaffAuthLogout) =>\n this.loginDriver.logout().pipe(\n map(() => new DaffAuthLogoutSuccess()),\n catchError((error: DaffError) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(new DaffAuthServerSide(this.errorMatcher(error)));\n case error instanceof DaffStorageServiceError:\n return of(new DaffAuthStorageFailure(this.errorMatcher(error)));\n default:\n return of(new DaffAuthLogoutFailure(this.errorMatcher(error)));\n }\n }),\n ),\n ),\n ));\n}\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n of,\n Observable,\n iif,\n defer,\n} from 'rxjs';\nimport {\n switchMap,\n map,\n catchError,\n tap,\n} from 'rxjs/operators';\n\nimport {\n DaffAccountRegistration,\n DaffAuthStorageService,\n DAFF_AUTH_ERROR_MATCHER,\n} from '@daffodil/auth';\nimport {\n DaffRegisterDriver,\n DaffRegisterServiceInterface,\n} from '@daffodil/auth/driver';\nimport {\n DaffError,\n DaffServerSideStorageError,\n DaffStorageServiceError,\n} from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\n\nimport {\n DaffAuthRegisterActionTypes,\n DaffAuthRegisterSuccess,\n DaffAuthRegisterFailure,\n DaffAuthServerSide,\n DaffAuthStorageFailure,\n DaffAuthRegisterActions,\n} from '../actions/public_api';\n\n@Injectable()\nexport class DaffAuthRegisterEffects<\n T extends DaffAccountRegistration = DaffAccountRegistration,\n> {\n constructor(\n private actions$: Actions<DaffAuthRegisterActions<T>>,\n @Inject(DaffRegisterDriver) private registerDriver: DaffRegisterServiceInterface<T>,\n @Inject(DAFF_AUTH_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n private storage: DaffAuthStorageService,\n ) {}\n\n register$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthRegisterActionTypes.RegisterAction),\n switchMap((action) =>\n iif(\n () => action.autoLogin,\n defer(() => this.registerDriver.register(action.registration).pipe(\n tap(token => this.storage.setAuthToken(token)),\n map((token) => new DaffAuthRegisterSuccess(token)),\n )),\n defer(() => this.registerDriver.registerOnly(action.registration).pipe(\n map(() => new DaffAuthRegisterSuccess()),\n )),\n ).pipe(\n catchError((error: DaffError) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(\n new DaffAuthServerSide(this.errorMatcher(error)),\n new DaffAuthRegisterFailure(this.errorMatcher(error)),\n );\n\n case error instanceof DaffStorageServiceError:\n return of(\n new DaffAuthStorageFailure(this.errorMatcher(error)),\n new DaffAuthRegisterFailure(this.errorMatcher(error)),\n );\n\n default:\n return of(new DaffAuthRegisterFailure(this.errorMatcher(error)));\n }\n }),\n ),\n ),\n ));\n}\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n of,\n Observable,\n iif,\n defer,\n} from 'rxjs';\nimport {\n switchMap,\n map,\n catchError,\n tap,\n} from 'rxjs/operators';\n\nimport {\n DAFF_AUTH_ERROR_MATCHER,\n DaffAuthResetPasswordInfo,\n DaffAuthStorageService,\n} from '@daffodil/auth';\nimport {\n DaffResetPasswordDriver,\n DaffResetPasswordServiceInterface,\n} from '@daffodil/auth/driver';\nimport {\n DaffError,\n DaffServerSideStorageError,\n DaffStorageServiceError,\n} from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\n\nimport {\n DaffAuthResetPasswordActionTypes,\n DaffResetPassword,\n DaffResetPasswordSuccess,\n DaffResetPasswordFailure,\n DaffSendResetEmail,\n DaffSendResetEmailSuccess,\n DaffSendResetEmailFailure,\n DaffAuthServerSide,\n DaffAuthStorageFailure,\n} from '../actions/public_api';\n\n@Injectable()\nexport class DaffAuthResetPasswordEffects<\n T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo,\n> {\n constructor(\n private actions$: Actions,\n @Inject(DaffResetPasswordDriver) private driver: DaffResetPasswordServiceInterface<T>,\n @Inject(DAFF_AUTH_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n private storage: DaffAuthStorageService,\n ) {}\n\n sendResetEmail$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthResetPasswordActionTypes.SendResetEmailAction),\n switchMap((action: DaffSendResetEmail) =>\n this.driver.sendResetEmail(action.email).pipe(\n map(() =>\n new DaffSendResetEmailSuccess(),\n ),\n catchError((error: DaffError) =>\n of(new DaffSendResetEmailFailure(this.errorMatcher(error))),\n ),\n ),\n ),\n ));\n\n resetPassword$ = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthResetPasswordActionTypes.ResetPasswordAction),\n switchMap((action: DaffResetPassword<T>) =>\n iif(\n () => action.autoLogin,\n defer(() => this.driver.resetPassword(action.info).pipe(\n tap(token => this.storage.setAuthToken(token)),\n map((token) => new DaffResetPasswordSuccess(token)),\n )),\n defer(() => this.driver.resetPasswordOnly(action.info).pipe(\n map(() => new DaffResetPasswordSuccess()),\n )),\n ).pipe(\n catchError((error: DaffError) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(\n new DaffAuthServerSide(this.errorMatcher(error)),\n new DaffResetPasswordFailure(this.errorMatcher(error)),\n );\n\n case error instanceof DaffStorageServiceError:\n return of(\n new DaffAuthStorageFailure(this.errorMatcher(error)),\n new DaffResetPasswordFailure(this.errorMatcher(error)),\n );\n\n default:\n return of(new DaffResetPasswordFailure(this.errorMatcher(error)));\n }\n }),\n ),\n ),\n ));\n}\n","import {\n inject,\n InjectionToken,\n} from '@angular/core';\nimport {\n ActionReducer,\n combineReducers,\n} from '@ngrx/store';\n\nimport { daffComposeReducers } from '@daffodil/core/state';\n\nimport { DAFF_AUTH_EXTRA_REDUCERS } from './extra.token';\nimport { DaffAuthFeatureState } from '../auth-feature-state.interface';\nimport { daffAuthReducers } from '../auth-reducers';\n\n/**\n * An internal token to hold the Daffodil auth reducers.\n * Includes the extra and standard reducers.\n *\n * @docs-private\n */\nexport const DAFF_AUTH_REDUCERS = new InjectionToken<ActionReducer<DaffAuthFeatureState>>(\n 'DAFF_AUTH_REDUCERS',\n {\n factory: () => daffComposeReducers([\n combineReducers(daffAuthReducers),\n ...inject(DAFF_AUTH_EXTRA_REDUCERS),\n ]),\n },\n);\n","import {\n ModuleWithProviders,\n NgModule,\n inject,\n} from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { of } from 'rxjs';\n\nimport { DaffAuthStorageService } from '@daffodil/auth';\n\nimport {\n DaffAuthStateConfig,\n daffAuthStateDefaultConfig,\n provideDaffAuthStateConfig,\n} from './config/public_api';\nimport { DaffAuthEffects } from './effects/auth.effects';\nimport { DaffAuthLoginEffects } from './effects/login.effects';\nimport { DaffAuthRegisterEffects } from './effects/register.effects';\nimport { DaffAuthResetPasswordEffects } from './effects/reset-password.effects';\nimport {\n DAFF_AUTH_UNAUTHENTICATED_HOOKS,\n DaffAuthUnauthenticatedHook,\n} from './injection-tokens/public_api';\nimport { DAFF_AUTH_STORE_FEATURE_KEY } from './reducers/public_api';\nimport { DAFF_AUTH_REDUCERS } from './reducers/token/reducers.token';\n\n\n@NgModule({\n imports: [\n StoreModule.forFeature(DAFF_AUTH_STORE_FEATURE_KEY, DAFF_AUTH_REDUCERS),\n EffectsModule.forFeature([\n DaffAuthEffects,\n DaffAuthLoginEffects,\n DaffAuthRegisterEffects,\n DaffAuthResetPasswordEffects,\n ]),\n ],\n providers: [\n {\n provide: DAFF_AUTH_UNAUTHENTICATED_HOOKS,\n useFactory: () => {\n const storage = inject(DaffAuthStorageService);\n const hook: DaffAuthUnauthenticatedHook = () => {\n try {\n return of(storage.removeAuthToken());\n } catch {\n return of(null);\n }\n };\n\n return hook;\n },\n multi: true,\n },\n ],\n})\nexport class DaffAuthStateModule {\n static withConfig(config: Partial<DaffAuthStateConfig> = {}): ModuleWithProviders<DaffAuthStateModule> {\n return {\n ngModule: DaffAuthStateModule,\n providers: [\n provideDaffAuthStateConfig({\n ...daffAuthStateDefaultConfig,\n ...config,\n }),\n ],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OAAM,EAAA,EAAA;AACN,wCAAA,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC;AACjB,qCAAA;AACH,iCAAC,CAAA,CAAC;AAEF,gCAAA,OAAO,IAAI,CAAC;AACd,6BAAC,CAAA;AACD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA;iBACF,CAAA;;;ACxDD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-auth-state.mjs","sources":["../../../libs/auth/state/src/actions/auth.actions.ts","../../../libs/auth/state/src/actions/login.actions.ts","../../../libs/auth/state/src/actions/register.actions.ts","../../../libs/auth/state/src/actions/reset-password.actions.ts","../../../libs/auth/state/src/reducers/auth/auth-initial-state.ts","../../../libs/auth/state/src/reducers/auth/auth.reducer.ts","../../../libs/auth/state/src/reducers/login/login-initial-state.ts","../../../libs/auth/state/src/reducers/login/login.reducer.ts","../../../libs/auth/state/src/reducers/register/register-initial-state.ts","../../../libs/auth/state/src/reducers/register/register.reducer.ts","../../../libs/auth/state/src/reducers/reset-password/initial-state.ts","../../../libs/auth/state/src/reducers/reset-password/reducer.ts","../../../libs/auth/state/src/reducers/token/extra.token.ts","../../../libs/auth/state/src/reducers/auth-store-feature-key.ts","../../../libs/auth/state/src/reducers/auth-reducers.ts","../../../libs/auth/state/src/selectors/auth-feature.selector.ts","../../../libs/auth/state/src/selectors/auth/auth.selector.ts","../../../libs/auth/state/src/selectors/login/login.selector.ts","../../../libs/auth/state/src/selectors/register/register.selector.ts","../../../libs/auth/state/src/selectors/reset-password/selector.ts","../../../libs/auth/state/src/selectors/auth-all.selector.ts","../../../libs/auth/state/src/facades/auth/facade.ts","../../../libs/auth/state/src/facades/login/facade.ts","../../../libs/auth/state/src/facades/register/facade.ts","../../../libs/auth/state/src/facades/reset-password/facade.ts","../../../libs/auth/state/src/config/default.ts","../../../libs/auth/state/src/config/token.ts","../../../libs/auth/state/src/injection-tokens/unauthenticated/hooks.token.ts","../../../libs/auth/state/src/injection-tokens/error-matcher.token.ts","../../../libs/auth/state/src/injection-tokens/unauthenticated/hook.token.ts","../../../libs/auth/state/src/effects/auth.effects.ts","../../../libs/auth/state/src/effects/login.effects.ts","../../../libs/auth/state/src/effects/register.effects.ts","../../../libs/auth/state/src/effects/reset-password.effects.ts","../../../libs/auth/state/src/reducers/token/reducers.token.ts","../../../libs/auth/state/src/auth-state.module.ts","../../../libs/auth/state/src/daffodil-auth-state.ts"],"sourcesContent":["import { Action } from '@ngrx/store';\n\nimport { DaffStateError } from '@daffodil/core/state';\n\nexport enum DaffAuthActionTypes {\n ResetToUnauthenticatedAction = '[@daffodil/auth] Reset To Unauthenticated Action',\n AuthStorageFailureAction = '[@daffodil/auth] Auth Storage Failure Action',\n AuthGuardLogoutAction = '[@daffodil/auth] Auth Guard Logout Action',\n AuthServerSideAction = '[@daffodil/auth] Auth Server Side Action',\n AuthCheckAction = '[@daffodil/auth] Auth Check Action',\n AuthCheckSuccessAction = '[@daffodil/auth] Auth Check Success Action',\n AuthCheckFailureAction = '[@daffodil/auth] Auth Check Failure Action',\n}\n\n/*\n * An action triggered when the authenicated status of the user is invalidated for some reason.\n * That reason could be a logout, auth token check failure, or an unauthorized error.\n */\nexport class DaffAuthResetToUnauthenticated implements Action {\n readonly type = DaffAuthActionTypes.ResetToUnauthenticatedAction;\n\n constructor(\n public reason: Action['type'],\n ) {}\n}\n\n/*\n * An action triggered upon a failed auth storage operation.\n */\nexport class DaffAuthStorageFailure implements Action {\n readonly type = DaffAuthActionTypes.AuthStorageFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/*\n * An action triggered when an auth token is cleared from storage by a routing guard.\n */\nexport class DaffAuthGuardLogout implements Action {\n readonly type = DaffAuthActionTypes.AuthGuardLogoutAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/*\n * An action triggered when an invalid operation is performed in the server environment.\n * A common example is trying to access the auth token from storage.\n */\nexport class DaffAuthServerSide implements Action {\n readonly type = DaffAuthActionTypes.AuthServerSideAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/**\n * An action triggered to initialize an auth check request.\n */\nexport class DaffAuthCheck implements Action {\n readonly type = DaffAuthActionTypes.AuthCheckAction;\n}\n\n/**\n * An action triggered upon a successful auth check.\n *\n * @param token - the customer access token\n */\nexport class DaffAuthCheckSuccess implements Action {\n readonly type = DaffAuthActionTypes.AuthCheckSuccessAction;\n}\n\n/**\n * An action triggered upon a failed auth check request.\n *\n * @param errorMessage - an error message\n */\nexport class DaffAuthCheckFailure implements Action {\n readonly type = DaffAuthActionTypes.AuthCheckFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\nexport type DaffAuthActions =\n | DaffAuthResetToUnauthenticated\n | DaffAuthStorageFailure\n | DaffAuthGuardLogout\n | DaffAuthServerSide\n | DaffAuthCheck\n | DaffAuthCheckSuccess\n | DaffAuthCheckFailure;\n","import { Action } from '@ngrx/store';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nexport enum DaffAuthLoginActionTypes {\n LoginAction = '[@daffodil/auth] Login Action',\n LoginSuccessAction = '[@daffodil/auth] Login Success Action',\n LoginFailureAction = '[@daffodil/auth] Login Failure Action',\n LogoutAction = '[@daffodil/auth] Logout Action',\n LogoutSuccessAction = '[@daffodil/auth] Logout Success Action',\n LogoutFailureAction = '[@daffodil/auth] Logout Failure Action',\n}\n\n/**\n * An action triggered to initialize a auth login request.\n */\nexport class DaffAuthLogin<T extends DaffLoginInfo = DaffLoginInfo> implements Action {\n readonly type = DaffAuthLoginActionTypes.LoginAction;\n\n constructor(public loginInfo: T) {}\n}\n\n/**\n * An action triggered upon a successful auth login.\n *\n * @param token - the customer access token\n */\nexport class DaffAuthLoginSuccess<T extends DaffAuthToken = DaffAuthToken> implements Action {\n readonly type = DaffAuthLoginActionTypes.LoginSuccessAction;\n\n constructor(public auth: T) {}\n}\n\n/**\n * An action triggered upon a failed auth login request.\n *\n * @param errorMessage - an error message\n */\nexport class DaffAuthLoginFailure implements Action {\n readonly type = DaffAuthLoginActionTypes.LoginFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/**\n * An action triggered to initialize a logout request.\n */\nexport class DaffAuthLogout implements Action {\n readonly type = DaffAuthLoginActionTypes.LogoutAction;\n}\n\n/**\n * An action triggered upon a successful logout.\n *\n * @param token - the customer access token\n */\nexport class DaffAuthLogoutSuccess implements Action {\n readonly type = DaffAuthLoginActionTypes.LogoutSuccessAction;\n}\n\n/**\n * An action triggered upon a failed logout request.\n *\n * @param errorMessage - an error message\n */\nexport class DaffAuthLogoutFailure implements Action {\n readonly type = DaffAuthLoginActionTypes.LogoutFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\nexport type DaffAuthLoginActions<\n T extends DaffLoginInfo = DaffLoginInfo,\n U extends DaffAuthToken = DaffAuthToken,\n> =\n | DaffAuthLogin<T>\n | DaffAuthLoginSuccess<U>\n | DaffAuthLoginFailure\n | DaffAuthLogout\n | DaffAuthLogoutSuccess\n | DaffAuthLogoutFailure;\n","import { Action } from '@ngrx/store';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nexport enum DaffAuthRegisterActionTypes {\n RegisterAction = '[@daffodil/auth] Register Action',\n RegisterSuccessAction = '[@daffodil/auth] Register Success Action',\n RegisterFailureAction = '[@daffodil/auth] Register Failure Action',\n}\n\n/**\n * An action triggered to initialize a auth register request.\n *\n * @param registration\n */\nexport class DaffAuthRegister<T extends DaffAccountRegistration = DaffAccountRegistration> implements Action {\n readonly type = DaffAuthRegisterActionTypes.RegisterAction;\n\n constructor(public registration: T, public autoLogin = true) {}\n}\n\n/**\n * An action triggered upon a successful auth register request.\n *\n * @param token - the customer access token\n */\nexport class DaffAuthRegisterSuccess implements Action {\n readonly type = DaffAuthRegisterActionTypes.RegisterSuccessAction;\n\n constructor(public token?: string) {}\n}\n\n/**\n * An action triggered upon a failed auth request.\n *\n * @param errorMessage - an error message\n */\nexport class DaffAuthRegisterFailure implements Action {\n readonly type = DaffAuthRegisterActionTypes.RegisterFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\nexport type DaffAuthRegisterActions<\n T extends DaffAccountRegistration = DaffAccountRegistration,\n> =\n | DaffAuthRegister<T>\n | DaffAuthRegisterSuccess\n | DaffAuthRegisterFailure;\n","import { Action } from '@ngrx/store';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nexport enum DaffAuthResetPasswordActionTypes {\n SendResetEmailAction = '[@daffodil/auth] Send Reset Email Action',\n SendResetEmailSuccessAction = '[@daffodil/auth] Send Reset Email Success Action',\n SendResetEmailFailureAction = '[@daffodil/auth] Send Reset Email Failure Action',\n ResetPasswordAction = '[@daffodil/auth] Reset Password Action',\n ResetPasswordSuccessAction = '[@daffodil/auth] Reset Password Success Action',\n ResetPasswordFailureAction = '[@daffodil/auth] Reset Password Failure Action',\n ResetPasswordLandingAction = '[@daffodil/auth] Reset Password Landing Action',\n}\n\n/**\n * An action triggered to send the specified customer an email to reset their password.\n */\nexport class DaffSendResetEmail implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.SendResetEmailAction;\n\n constructor(public email: string) {}\n}\n\n/**\n * An action triggered upon a successfully sent reset password email.\n */\nexport class DaffSendResetEmailSuccess implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.SendResetEmailSuccessAction;\n}\n\n/**\n * An action triggered upon a failure to send the reset password email.\n *\n * @param errorMessage - an error message\n */\nexport class DaffSendResetEmailFailure implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.SendResetEmailFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/**\n * An action triggered to initialize a logout request.\n */\nexport class DaffResetPassword<T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo> implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.ResetPasswordAction;\n\n constructor(public info: T, public autoLogin = true) {}\n}\n\n/**\n * An action triggered upon a successful logout.\n */\nexport class DaffResetPasswordSuccess implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.ResetPasswordSuccessAction;\n\n constructor(public token?: string) {}\n}\n\n/**\n * An action triggered upon a failed logout request.\n *\n * @param errorMessage - an error message\n */\nexport class DaffResetPasswordFailure implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.ResetPasswordFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/**\n * An action triggered upon the user navigating to the reset password page from the link in their email.\n *\n * @param token - The token with which the password can be reset\n */\nexport class DaffResetPasswordLanding implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.ResetPasswordLandingAction;\n\n constructor(public token: DaffAuthResetPasswordInfo['token']) {}\n}\n\nexport type DaffAuthResetPasswordActions<\n T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo,\n> =\n | DaffSendResetEmail\n | DaffSendResetEmailSuccess\n | DaffSendResetEmailFailure\n | DaffResetPassword<T>\n | DaffResetPasswordSuccess\n | DaffResetPasswordFailure\n | DaffResetPasswordLanding;\n","import { daffOperationInitialState } from '@daffodil/core/state';\n\nimport { DaffAuthReducerState } from './auth-reducer-state.interface';\n\nexport const daffAuthInitialState: DaffAuthReducerState = {\n ...daffOperationInitialState,\n loggedIn: false,\n};\n","import {\n daffCompleteOperation,\n daffOperationFailed,\n daffStartResolution,\n} from '@daffodil/core/state';\n\nimport { daffAuthInitialState } from './auth-initial-state';\nimport { DaffAuthReducerState } from './auth-reducer-state.interface';\nimport {\n DaffAuthActionTypes,\n DaffAuthActions,\n DaffAuthLoginActionTypes,\n DaffAuthLoginActions,\n DaffAuthRegisterActionTypes,\n DaffAuthRegisterSuccess,\n DaffAuthResetPasswordActionTypes,\n DaffAuthResetPasswordActions,\n} from '../../actions/public_api';\n\nexport function daffAuthReducer(\n state = daffAuthInitialState,\n action: DaffAuthActions | DaffAuthLoginActions | DaffAuthRegisterSuccess | DaffAuthResetPasswordActions,\n): DaffAuthReducerState {\n switch (action.type) {\n case DaffAuthActionTypes.AuthCheckAction:\n return daffStartResolution(state);\n\n case DaffAuthActionTypes.AuthCheckSuccessAction:\n return {\n ...daffCompleteOperation(state),\n loggedIn: true,\n };\n\n case DaffAuthActionTypes.AuthCheckFailureAction:\n case DaffAuthActionTypes.AuthGuardLogoutAction:\n return {\n ...daffOperationFailed([action.errorMessage], state),\n loggedIn: false,\n };\n\n case DaffAuthActionTypes.AuthServerSideAction:\n case DaffAuthActionTypes.AuthStorageFailureAction:\n return daffOperationFailed([action.errorMessage], state);\n\n case DaffAuthLoginActionTypes.LoginSuccessAction:\n return {\n ...state,\n loggedIn: true,\n };\n\n case DaffAuthRegisterActionTypes.RegisterSuccessAction:\n case DaffAuthResetPasswordActionTypes.ResetPasswordSuccessAction:\n return action.token ? {\n ...state,\n loggedIn: true,\n } : state;\n\n case DaffAuthLoginActionTypes.LogoutSuccessAction:\n return {\n ...state,\n loggedIn: false,\n };\n\n default:\n return state;\n }\n}\n","import { daffOperationInitialState } from '@daffodil/core/state';\n\nimport { DaffAuthLoginReducerState } from './login-reducer-state.interface';\n\nexport const daffAuthLoginInitialState: DaffAuthLoginReducerState = daffOperationInitialState;\n","import {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\nimport {\n daffCompleteOperation,\n daffOperationFailed,\n daffStartMutation,\n} from '@daffodil/core/state';\n\nimport { daffAuthLoginInitialState } from './login-initial-state';\nimport { DaffAuthLoginReducerState } from './login-reducer-state.interface';\nimport {\n DaffAuthLoginActionTypes,\n DaffAuthLoginActions,\n} from '../../actions/public_api';\n\nexport function daffAuthLoginReducer<\n T extends DaffLoginInfo,\n U extends DaffAuthToken,\n>(\n state = daffAuthLoginInitialState,\n action: DaffAuthLoginActions<T, U>,\n): DaffAuthLoginReducerState {\n switch (action.type) {\n case DaffAuthLoginActionTypes.LoginAction:\n case DaffAuthLoginActionTypes.LogoutAction:\n return daffStartMutation(state);\n\n case DaffAuthLoginActionTypes.LoginSuccessAction:\n case DaffAuthLoginActionTypes.LogoutSuccessAction:\n return daffCompleteOperation(state);\n\n case DaffAuthLoginActionTypes.LoginFailureAction:\n case DaffAuthLoginActionTypes.LogoutFailureAction:\n return daffOperationFailed([action.errorMessage], state);\n\n default:\n return state;\n }\n}\n","import { daffOperationInitialState } from '@daffodil/core/state';\n\nimport { DaffAuthRegisterReducerState } from './register-reducer-state.interface';\n\nexport const daffAuthRegisterInitialState: DaffAuthRegisterReducerState = daffOperationInitialState;\n","import { DaffAccountRegistration } from '@daffodil/auth';\nimport {\n daffCompleteOperation,\n daffOperationFailed,\n daffStartMutation,\n} from '@daffodil/core/state';\n\nimport { daffAuthRegisterInitialState } from './register-initial-state';\nimport { DaffAuthRegisterReducerState } from './register-reducer-state.interface';\nimport {\n DaffAuthRegisterActionTypes,\n DaffAuthRegisterActions,\n} from '../../actions/public_api';\n\nexport function daffAuthRegisterReducer<\n T extends DaffAccountRegistration,\n>(\n state = daffAuthRegisterInitialState,\n action: DaffAuthRegisterActions<T>,\n): DaffAuthRegisterReducerState {\n switch (action.type) {\n case DaffAuthRegisterActionTypes.RegisterAction:\n return daffStartMutation(state);\n\n case DaffAuthRegisterActionTypes.RegisterSuccessAction:\n return daffCompleteOperation(state);\n\n case DaffAuthRegisterActionTypes.RegisterFailureAction:\n return daffOperationFailed([action.errorMessage], state);\n\n default:\n return state;\n }\n}\n","import { daffOperationInitialState } from '@daffodil/core/state';\n\nimport { DaffAuthResetPasswordReducerState } from './state.interface';\n\nexport const daffAuthResetPasswordInitialState: DaffAuthResetPasswordReducerState = {\n ...daffOperationInitialState,\n token: null,\n};\n","import { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport {\n daffCompleteOperation,\n daffOperationFailed,\n daffStartMutation,\n} from '@daffodil/core/state';\n\nimport { daffAuthResetPasswordInitialState } from './initial-state';\nimport { DaffAuthResetPasswordReducerState } from './state.interface';\nimport {\n DaffAuthResetPasswordActionTypes,\n DaffAuthResetPasswordActions,\n} from '../../actions/public_api';\n\nexport function daffAuthResetPasswordReducer<\n T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo,\n>(\n state = daffAuthResetPasswordInitialState,\n action: DaffAuthResetPasswordActions<T>,\n): DaffAuthResetPasswordReducerState {\n switch (action.type) {\n case DaffAuthResetPasswordActionTypes.ResetPasswordAction:\n case DaffAuthResetPasswordActionTypes.SendResetEmailAction:\n return daffStartMutation(state);\n\n case DaffAuthResetPasswordActionTypes.ResetPasswordSuccessAction:\n case DaffAuthResetPasswordActionTypes.SendResetEmailSuccessAction:\n return daffCompleteOperation(state);\n\n case DaffAuthResetPasswordActionTypes.ResetPasswordFailureAction:\n case DaffAuthResetPasswordActionTypes.SendResetEmailFailureAction:\n return daffOperationFailed([action.errorMessage], state);\n\n case DaffAuthResetPasswordActionTypes.ResetPasswordLandingAction:\n return {\n ...state,\n token: action.token,\n };\n\n default:\n return state;\n }\n}\n","import {\n InjectionToken,\n Provider,\n} from '@angular/core';\nimport { ActionReducer } from '@ngrx/store';\n\nimport { DaffAuthFeatureState } from '../auth-feature-state.interface';\n\n/**\n * A token to hold the injectable extra reducers.\n *\n * Prefer using {@link daffAuthProvideExtraReducers}.\n */\nexport const DAFF_AUTH_EXTRA_REDUCERS = new InjectionToken<ActionReducer<DaffAuthFeatureState>[]>(\n 'DAFF_AUTH_EXTRA_REDUCERS',\n { factory: () => []},\n);\n\n/**\n * Provides additional reducers that run after the standard Daffodil auth reducers.\n *\n * ```ts\n * providers: [\n * ...daffAuthProvideExtraReducers(\n * myReducer1,\n * myReducer2\n * )\n * ]\n * ```\n */\nexport function daffAuthProvideExtraReducers(\n ...reducers: ActionReducer<DaffAuthFeatureState>[]\n): Provider[] {\n return reducers.map(reducer => ({\n provide: DAFF_AUTH_EXTRA_REDUCERS,\n useValue: reducer,\n multi: true,\n }));\n}\n","export const DAFF_AUTH_STORE_FEATURE_KEY = 'daffAuth';\n","import { ActionReducerMap } from '@ngrx/store';\n\nimport { daffAuthReducer } from './auth/public_api';\nimport { DaffAuthFeatureState } from './auth-feature-state.interface';\nimport { daffAuthLoginReducer } from './login/public_api';\nimport { daffAuthRegisterReducer } from './register/public_api';\nimport { daffAuthResetPasswordReducer } from './reset-password/public_api';\n\nexport const daffAuthReducers: ActionReducerMap<DaffAuthFeatureState> = {\n auth: daffAuthReducer,\n login: daffAuthLoginReducer,\n register: daffAuthRegisterReducer,\n resetPassword: daffAuthResetPasswordReducer,\n};\n","import {\n createFeatureSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport {\n DaffAuthFeatureState,\n DAFF_AUTH_STORE_FEATURE_KEY,\n} from '../reducers/public_api';\n\n/**\n * Feature State Selector\n */\nexport const getDaffAuthFeatureStateSelector = (() => {\n let cache;\n return (): MemoizedSelector<Record<string, any>, DaffAuthFeatureState> =>\n cache = cache || createFeatureSelector<DaffAuthFeatureState>(DAFF_AUTH_STORE_FEATURE_KEY);\n})();\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport {\n daffOperationStateSelectorFactory,\n DaffOperationStateSelectors,\n} from '@daffodil/core/state';\n\nimport {\n DaffAuthReducerState,\n DaffAuthStateRootSlice,\n} from '../../reducers/public_api';\nimport { getDaffAuthFeatureStateSelector } from '../auth-feature.selector';\n\nexport interface AuthSelectors extends DaffOperationStateSelectors<DaffAuthStateRootSlice, DaffAuthReducerState> {\n selectAuthState: MemoizedSelector<DaffAuthStateRootSlice, DaffAuthReducerState>;\n selectAuthLoggedIn: MemoizedSelector<DaffAuthStateRootSlice, boolean>;\n}\n\nconst createAuthSelectors = () => {\n const selectAuthState = createSelector(\n getDaffAuthFeatureStateSelector(),\n state => state.auth,\n );\n\n const selectAuthLoggedIn = createSelector(\n selectAuthState,\n state => state.loggedIn,\n );\n\n return {\n ...daffOperationStateSelectorFactory<DaffAuthStateRootSlice, DaffAuthReducerState>(selectAuthState),\n selectAuthState,\n selectAuthLoggedIn,\n };\n};\n\nexport const daffAuthSelectorFactory = (() => {\n let cache;\n return (): AuthSelectors =>\n cache = cache || createAuthSelectors();\n})();\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport {\n daffOperationStateSelectorFactory,\n DaffOperationStateSelectors,\n DaffStateError,\n} from '@daffodil/core/state';\n\nimport {\n DaffAuthLoginReducerState,\n DaffAuthStateRootSlice,\n} from '../../reducers/public_api';\nimport { getDaffAuthFeatureStateSelector } from '../auth-feature.selector';\n\nexport interface DaffAuthLoginSelectors extends DaffOperationStateSelectors<DaffAuthStateRootSlice, DaffAuthLoginReducerState> {\n selectAuthLoginState: MemoizedSelector<DaffAuthStateRootSlice, DaffAuthLoginReducerState>;\n}\n\nconst createLoginSelectors = () => {\n const selectAuthLoginState = createSelector(\n getDaffAuthFeatureStateSelector(),\n state => state.login,\n );\n\n\n return {\n ...daffOperationStateSelectorFactory<DaffAuthStateRootSlice, DaffAuthLoginReducerState>(selectAuthLoginState),\n selectAuthLoginState,\n };\n};\n\nexport const daffAuthLoginSelectorFactory = (() => {\n let cache;\n return (): DaffAuthLoginSelectors =>\n cache = cache || createLoginSelectors();\n})();\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport {\n daffOperationStateSelectorFactory,\n DaffOperationStateSelectors,\n} from '@daffodil/core/state';\n\nimport {\n DaffAuthRegisterReducerState,\n DaffAuthStateRootSlice,\n} from '../../reducers/public_api';\nimport { getDaffAuthFeatureStateSelector } from '../auth-feature.selector';\n\nexport interface DaffAuthRegisterSelectors extends DaffOperationStateSelectors<DaffAuthStateRootSlice, DaffAuthRegisterReducerState> {\n selectAuthRegisterState: MemoizedSelector<DaffAuthStateRootSlice, DaffAuthRegisterReducerState>;\n}\n\nconst createRegisterSelectors = () => {\n const selectAuthRegisterState = createSelector(\n getDaffAuthFeatureStateSelector(),\n state => state.register,\n );\n\n return {\n ...daffOperationStateSelectorFactory<DaffAuthStateRootSlice, DaffAuthRegisterReducerState>(selectAuthRegisterState),\n selectAuthRegisterState,\n };\n};\n\nexport const daffAuthRegisterSelectorFactory = (() => {\n let cache;\n return (): DaffAuthRegisterSelectors =>\n cache = cache || createRegisterSelectors();\n})();\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport {\n daffOperationStateSelectorFactory,\n DaffOperationStateSelectors,\n} from '@daffodil/core/state';\n\nimport {\n DaffAuthResetPasswordReducerState,\n DaffAuthStateRootSlice,\n} from '../../reducers/public_api';\nimport { getDaffAuthFeatureStateSelector } from '../auth-feature.selector';\n\nexport interface DaffAuthResetPasswordSelectors extends DaffOperationStateSelectors<DaffAuthStateRootSlice, DaffAuthResetPasswordReducerState> {\n selectAuthResetPasswordState: MemoizedSelector<DaffAuthStateRootSlice, DaffAuthResetPasswordReducerState>;\n selectAuthResetPasswordToken: MemoizedSelector<DaffAuthStateRootSlice, DaffAuthResetPasswordInfo['token']>;\n}\n\nconst createResetPasswordSelectors = (): DaffAuthResetPasswordSelectors => {\n const selectAuthResetPasswordState = createSelector(\n getDaffAuthFeatureStateSelector(),\n state => state.resetPassword,\n );\n\n const selectAuthResetPasswordToken = createSelector(\n selectAuthResetPasswordState,\n state => state.token,\n );\n\n return {\n ...daffOperationStateSelectorFactory<DaffAuthStateRootSlice, DaffAuthResetPasswordReducerState>(selectAuthResetPasswordState),\n selectAuthResetPasswordState,\n selectAuthResetPasswordToken,\n };\n};\n\nexport const daffAuthResetPasswordSelectorFactory = (() => {\n let cache;\n return (): DaffAuthResetPasswordSelectors =>\n cache = cache || createResetPasswordSelectors();\n})();\n","import { MemoizedSelector } from '@ngrx/store';\n\nimport {\n daffAuthSelectorFactory,\n AuthSelectors,\n} from './auth/auth.selector';\nimport { getDaffAuthFeatureStateSelector } from './auth-feature.selector';\nimport {\n daffAuthLoginSelectorFactory,\n DaffAuthLoginSelectors,\n} from './login/login.selector';\nimport {\n daffAuthRegisterSelectorFactory,\n DaffAuthRegisterSelectors,\n} from './register/register.selector';\nimport {\n DaffAuthResetPasswordSelectors,\n daffAuthResetPasswordSelectorFactory,\n} from './reset-password/selector';\nimport { DaffAuthFeatureState } from '../reducers/public_api';\n\nexport interface DaffAuthSelectors extends\n DaffAuthRegisterSelectors,\n DaffAuthLoginSelectors,\n DaffAuthResetPasswordSelectors,\n AuthSelectors {\n selectAuthFeatureState: MemoizedSelector<Record<string, any>, DaffAuthFeatureState>;\n}\n\nexport const getDaffAuthSelectors = (() => {\n let cache;\n return (): DaffAuthSelectors =>\n cache = cache || {\n ...daffAuthSelectorFactory(),\n ...daffAuthLoginSelectorFactory(),\n ...daffAuthRegisterSelectorFactory(),\n ...daffAuthResetPasswordSelectorFactory(),\n selectAuthFeatureState: getDaffAuthFeatureStateSelector(),\n };\n})();\n","import { Injectable } from '@angular/core';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthFacadeInterface } from './facade.interface';\nimport { DaffAuthStateRootSlice } from '../../reducers/public_api';\nimport { daffAuthSelectorFactory } from '../../selectors/auth/auth.selector';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthFacade implements DaffAuthFacadeInterface {\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n loggedIn$: Observable<boolean>;\n\n constructor(private store: Store<DaffAuthStateRootSlice>) {\n const {\n selectLoading,\n selectErrors,\n selectAuthLoggedIn,\n } = daffAuthSelectorFactory();\n\n this.loading$ = this.store.pipe(select(selectLoading));\n this.errors$ = this.store.pipe(select(selectErrors));\n this.loggedIn$ = this.store.pipe(select(selectAuthLoggedIn));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthLoginFacadeInterface } from './facade.interface';\nimport { DaffAuthStateRootSlice } from '../../reducers/public_api';\nimport { daffAuthLoginSelectorFactory } from '../../selectors/login/login.selector';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthLoginFacade implements DaffAuthLoginFacadeInterface {\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n\n constructor(private store: Store<DaffAuthStateRootSlice>) {\n const {\n selectLoading,\n selectErrors,\n } = daffAuthLoginSelectorFactory();\n\n this.loading$ = this.store.pipe(select(selectLoading));\n this.errors$ = this.store.pipe(select(selectErrors));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthRegisterFacadeInterface } from './facade.interface';\nimport { DaffAuthStateRootSlice } from '../../reducers/public_api';\nimport { daffAuthRegisterSelectorFactory } from '../../selectors/register/register.selector';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthRegisterFacade implements DaffAuthRegisterFacadeInterface {\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n\n constructor(private store: Store<DaffAuthStateRootSlice>) {\n const {\n selectLoading,\n selectErrors,\n } = daffAuthRegisterSelectorFactory();\n\n this.loading$ = this.store.pipe(select(selectLoading));\n this.errors$ = this.store.pipe(select(selectErrors));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthResetPasswordFacadeInterface } from './facade.interface';\nimport { DaffAuthStateRootSlice } from '../../reducers/public_api';\nimport { daffAuthResetPasswordSelectorFactory } from '../../selectors/reset-password/selector';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthResetPasswordFacade implements DaffAuthResetPasswordFacadeInterface {\n token$: Observable<DaffAuthResetPasswordInfo['token']>;\n\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n\n constructor(private store: Store<DaffAuthStateRootSlice>) {\n const {\n selectLoading,\n selectErrors,\n selectAuthResetPasswordToken,\n } = daffAuthResetPasswordSelectorFactory();\n\n this.token$ = this.store.pipe(select(selectAuthResetPasswordToken));\n\n this.loading$ = this.store.pipe(select(selectLoading));\n this.errors$ = this.store.pipe(select(selectErrors));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import { DaffAuthStateConfig } from './type';\n\nconst TWENTY_MINUTES = 1.2e6;\n\nexport const daffAuthStateDefaultConfig: DaffAuthStateConfig = {\n checkInterval: TWENTY_MINUTES,\n};\n","import {\n InjectionToken,\n ValueProvider,\n} from '@angular/core';\n\nimport { daffAuthStateDefaultConfig } from './default';\nimport { DaffAuthStateConfig } from './type';\n\nexport const DAFF_AUTH_STATE_CONFIG = new InjectionToken('DAFF_AUTH_STATE_CONFIG', { factory: () => daffAuthStateDefaultConfig });\n\nexport const provideDaffAuthStateConfig = (config: DaffAuthStateConfig): ValueProvider => ({\n provide: DAFF_AUTH_STATE_CONFIG,\n useValue: config,\n});\n","import {\n InjectionToken,\n Provider,\n} from '@angular/core';\n\nimport { DaffAuthUnauthenticatedHook } from './hook.type';\n\n/**\n * A token to hold the unauthenticated hooks.\n * See {@link DaffAuthUnauthenticatedHook}.\n *\n * Prefer using {@link daffAuthProvideUnauthenticatedHooks}.\n */\nexport const DAFF_AUTH_UNAUTHENTICATED_HOOKS = new InjectionToken<DaffAuthUnauthenticatedHook[]>(\n 'DAFF_AUTH_UNAUTHENTICATED_HOOKS',\n { factory: () => []},\n);\n\n/**\n * Provides {@link DAFF_AUTH_UNAUTHENTICATED_HOOKS}.\n *\n * ```ts\n * providers: [\n * ...daffAuthProvideUnauthenticatedHooks(\n * myReducer1,\n * myReducer2\n * )\n * ]\n * ```\n */\nexport function daffAuthProvideUnauthenticatedHooks(\n ...hooks: DaffAuthUnauthenticatedHook[]\n): Provider[] {\n return hooks.map(hook => ({\n provide: DAFF_AUTH_UNAUTHENTICATED_HOOKS,\n useValue: hook,\n multi: true,\n }));\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { daffTransformErrorToStateError } from '@daffodil/core/state';\n\n/**\n * Transforms `DaffError`s into `DaffStateError`s before they are serialized into state.\n * Can be used to further refine Daffodil errors into more specific app errors.\n */\nexport const DAFF_AUTH_ERROR_MATCHER = new InjectionToken<typeof daffTransformErrorToStateError>(\n 'DAFF_AUTH_ERROR_MATCHER',\n { factory: () => daffTransformErrorToStateError },\n);\n","import {\n inject,\n InjectionToken,\n} from '@angular/core';\nimport { combineLatest } from 'rxjs';\n\nimport { DaffAuthUnauthenticatedHook } from './hook.type';\nimport { DAFF_AUTH_UNAUTHENTICATED_HOOKS } from './hooks.token';\n\n/**\n * An internal token to hold the unauthenticated hook.\n * Combines the multi provided hooks into a single function.\n *\n * @docs-private\n */\nexport const DAFF_AUTH_UNAUTHENTICATED_HOOK = new InjectionToken<DaffAuthUnauthenticatedHook>(\n 'DAFF_AUTH_UNAUTHENTICATED_HOOK',\n {\n factory: () => {\n const hooks = inject(DAFF_AUTH_UNAUTHENTICATED_HOOKS);\n return (action) => combineLatest(hooks.map((hook) => hook(action)));\n },\n },\n);\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n of,\n EMPTY,\n} from 'rxjs';\nimport {\n switchMap,\n catchError,\n map,\n repeat,\n filter,\n tap,\n} from 'rxjs/operators';\n\nimport { DaffAuthStorageService } from '@daffodil/auth';\nimport {\n DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES,\n DaffAuthDriverTokenCheck,\n} from '@daffodil/auth/driver';\nimport {\n DaffError,\n DaffServerSideStorageError,\n DaffStorageServiceError,\n} from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\nimport {\n DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE,\n DaffDriverHttpClientCacheServiceInterface,\n} from '@daffodil/driver';\n\nimport {\n DaffAuthActionTypes,\n DaffAuthCheckSuccess,\n DaffAuthCheckFailure,\n DaffAuthCheck,\n DaffAuthStorageFailure,\n DaffAuthServerSide,\n DaffAuthLoginActionTypes,\n DaffAuthActions,\n DaffAuthLoginActions,\n DaffAuthResetToUnauthenticated,\n} from '../actions/public_api';\nimport {\n DaffAuthStateConfig,\n DAFF_AUTH_STATE_CONFIG,\n} from '../config/public_api';\nimport {\n DAFF_AUTH_ERROR_MATCHER,\n DaffAuthUnauthenticatedHook,\n} from '../injection-tokens/public_api';\nimport { DAFF_AUTH_UNAUTHENTICATED_HOOK } from '../injection-tokens/unauthenticated/hook.token';\n\n@Injectable()\nexport class DaffAuthEffects {\n constructor(\n private actions$: Actions<DaffAuthActions | DaffAuthLoginActions>,\n private tokenCheck: DaffAuthDriverTokenCheck,\n @Inject(DAFF_AUTH_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n private storage: DaffAuthStorageService,\n @Inject(DAFF_AUTH_STATE_CONFIG) private config: DaffAuthStateConfig,\n @Inject(DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE) private clientCache: DaffDriverHttpClientCacheServiceInterface,\n @Inject(DAFF_AUTH_UNAUTHENTICATED_HOOK) private unauthenticatedHook: DaffAuthUnauthenticatedHook,\n ) {}\n\n check$ = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthActionTypes.AuthCheckAction),\n switchMap((action) =>\n this.tokenCheck.check().pipe(\n map(() => new DaffAuthCheckSuccess()),\n catchError((error: DaffError) => of(new DaffAuthCheckFailure(this.errorMatcher(error)))),\n ),\n ),\n ));\n\n // this needs to be defined after `check$` or else the driver call won't be run\n authCheckInterval$ = createEffect(() => of(new DaffAuthCheck()).pipe(\n repeat({ delay: this.config.checkInterval }),\n filter(() => !!this.storage.getAuthToken()),\n catchError((error: Error) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(new DaffAuthServerSide(this.errorMatcher(error)));\n\n case error instanceof DaffStorageServiceError:\n return of(new DaffAuthStorageFailure(this.errorMatcher(error)));\n\n default:\n return EMPTY;\n }\n }),\n ));\n\n resetToUnauthenticated$ = createEffect(() => this.actions$.pipe(\n ofType(\n DaffAuthActionTypes.AuthCheckFailureAction,\n DaffAuthActionTypes.AuthGuardLogoutAction,\n DaffAuthLoginActionTypes.LogoutSuccessAction,\n ),\n filter((action) => {\n // if the auth check failure is for any reason other than auth failure,\n // such as a network failure, don't reset\n if (\n action.type === DaffAuthActionTypes.AuthCheckFailureAction\n && !DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES[action.errorMessage.code]\n ) {\n return false;\n }\n\n return true;\n }),\n map((action) => new DaffAuthResetToUnauthenticated(action.type)),\n ));\n\n clearClientCache$ = createEffect(() => this.actions$.pipe(\n ofType(\n DaffAuthActionTypes.ResetToUnauthenticatedAction,\n ),\n switchMap((action) => this.unauthenticatedHook(action.reason)),\n tap(() => {\n this.clientCache.reset();\n }),\n switchMap(() => EMPTY),\n ), { dispatch: false });\n}\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport { of } from 'rxjs';\nimport {\n switchMap,\n map,\n catchError,\n tap,\n} from 'rxjs/operators';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n DaffAuthStorageService,\n} from '@daffodil/auth';\nimport {\n DaffLoginDriver,\n DaffLoginServiceInterface,\n} from '@daffodil/auth/driver';\nimport {\n DaffError,\n DaffServerSideStorageError,\n DaffStorageServiceError,\n} from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\n\nimport {\n DaffAuthLoginActionTypes,\n DaffAuthLoginSuccess,\n DaffAuthLoginFailure,\n DaffAuthLogoutSuccess,\n DaffAuthLogoutFailure,\n DaffAuthLogout,\n DaffAuthServerSide,\n DaffAuthLoginActions,\n DaffAuthStorageFailure,\n} from '../actions/public_api';\nimport { DAFF_AUTH_ERROR_MATCHER } from '../injection-tokens/public_api';\n\n@Injectable()\nexport class DaffAuthLoginEffects<\n T extends DaffLoginInfo = DaffLoginInfo,\n U extends DaffAuthToken = DaffAuthToken,\n> {\n constructor(\n private actions$: Actions<DaffAuthLoginActions<T, U>>,\n @Inject(DaffLoginDriver) private loginDriver: DaffLoginServiceInterface<T, U>,\n @Inject(DAFF_AUTH_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n private storage: DaffAuthStorageService,\n ) {}\n\n login$ = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthLoginActionTypes.LoginAction),\n switchMap((action) =>\n this.loginDriver.login(action.loginInfo)\n .pipe(\n map((resp) => new DaffAuthLoginSuccess<U>(resp)),\n tap((success) => this.storage.setAuthToken(success.auth.token)),\n catchError((error: DaffError) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(new DaffAuthServerSide(this.errorMatcher(error)));\n case error instanceof DaffStorageServiceError:\n default:\n return of(new DaffAuthLoginFailure(this.errorMatcher(error)));\n }\n }),\n ),\n ),\n ));\n\n logout$ = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthLoginActionTypes.LogoutAction),\n switchMap((action: DaffAuthLogout) =>\n this.loginDriver.logout().pipe(\n map(() => new DaffAuthLogoutSuccess()),\n catchError((error: DaffError) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(new DaffAuthServerSide(this.errorMatcher(error)));\n case error instanceof DaffStorageServiceError:\n return of(new DaffAuthStorageFailure(this.errorMatcher(error)));\n default:\n return of(new DaffAuthLogoutFailure(this.errorMatcher(error)));\n }\n }),\n ),\n ),\n ));\n}\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n of,\n Observable,\n iif,\n defer,\n} from 'rxjs';\nimport {\n switchMap,\n map,\n catchError,\n tap,\n} from 'rxjs/operators';\n\nimport {\n DaffAccountRegistration,\n DaffAuthStorageService,\n} from '@daffodil/auth';\nimport {\n DaffRegisterDriver,\n DaffRegisterServiceInterface,\n} from '@daffodil/auth/driver';\nimport {\n DaffError,\n DaffServerSideStorageError,\n DaffStorageServiceError,\n} from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\n\nimport {\n DaffAuthRegisterActionTypes,\n DaffAuthRegisterSuccess,\n DaffAuthRegisterFailure,\n DaffAuthServerSide,\n DaffAuthStorageFailure,\n DaffAuthRegisterActions,\n} from '../actions/public_api';\nimport { DAFF_AUTH_ERROR_MATCHER } from '../injection-tokens/public_api';\n\n@Injectable()\nexport class DaffAuthRegisterEffects<\n T extends DaffAccountRegistration = DaffAccountRegistration,\n> {\n constructor(\n private actions$: Actions<DaffAuthRegisterActions<T>>,\n @Inject(DaffRegisterDriver) private registerDriver: DaffRegisterServiceInterface<T>,\n @Inject(DAFF_AUTH_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n private storage: DaffAuthStorageService,\n ) {}\n\n register$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthRegisterActionTypes.RegisterAction),\n switchMap((action) =>\n iif(\n () => action.autoLogin,\n defer(() => this.registerDriver.register(action.registration).pipe(\n tap(token => this.storage.setAuthToken(token)),\n map((token) => new DaffAuthRegisterSuccess(token)),\n )),\n defer(() => this.registerDriver.registerOnly(action.registration).pipe(\n map(() => new DaffAuthRegisterSuccess()),\n )),\n ).pipe(\n catchError((error: DaffError) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(\n new DaffAuthServerSide(this.errorMatcher(error)),\n new DaffAuthRegisterFailure(this.errorMatcher(error)),\n );\n\n case error instanceof DaffStorageServiceError:\n return of(\n new DaffAuthStorageFailure(this.errorMatcher(error)),\n new DaffAuthRegisterFailure(this.errorMatcher(error)),\n );\n\n default:\n return of(new DaffAuthRegisterFailure(this.errorMatcher(error)));\n }\n }),\n ),\n ),\n ));\n}\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n of,\n Observable,\n iif,\n defer,\n} from 'rxjs';\nimport {\n switchMap,\n map,\n catchError,\n tap,\n} from 'rxjs/operators';\n\nimport {\n DaffAuthResetPasswordInfo,\n DaffAuthStorageService,\n} from '@daffodil/auth';\nimport {\n DaffResetPasswordDriver,\n DaffResetPasswordServiceInterface,\n} from '@daffodil/auth/driver';\nimport {\n DaffError,\n DaffServerSideStorageError,\n DaffStorageServiceError,\n} from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\n\nimport {\n DaffAuthResetPasswordActionTypes,\n DaffResetPassword,\n DaffResetPasswordSuccess,\n DaffResetPasswordFailure,\n DaffSendResetEmail,\n DaffSendResetEmailSuccess,\n DaffSendResetEmailFailure,\n DaffAuthServerSide,\n DaffAuthStorageFailure,\n} from '../actions/public_api';\nimport { DAFF_AUTH_ERROR_MATCHER } from '../injection-tokens/public_api';\n\n@Injectable()\nexport class DaffAuthResetPasswordEffects<\n T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo,\n> {\n constructor(\n private actions$: Actions,\n @Inject(DaffResetPasswordDriver) private driver: DaffResetPasswordServiceInterface<T>,\n @Inject(DAFF_AUTH_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n private storage: DaffAuthStorageService,\n ) {}\n\n sendResetEmail$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthResetPasswordActionTypes.SendResetEmailAction),\n switchMap((action: DaffSendResetEmail) =>\n this.driver.sendResetEmail(action.email).pipe(\n map(() =>\n new DaffSendResetEmailSuccess(),\n ),\n catchError((error: DaffError) =>\n of(new DaffSendResetEmailFailure(this.errorMatcher(error))),\n ),\n ),\n ),\n ));\n\n resetPassword$ = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthResetPasswordActionTypes.ResetPasswordAction),\n switchMap((action: DaffResetPassword<T>) =>\n iif(\n () => action.autoLogin,\n defer(() => this.driver.resetPassword(action.info).pipe(\n tap(token => this.storage.setAuthToken(token)),\n map((token) => new DaffResetPasswordSuccess(token)),\n )),\n defer(() => this.driver.resetPasswordOnly(action.info).pipe(\n map(() => new DaffResetPasswordSuccess()),\n )),\n ).pipe(\n catchError((error: DaffError) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(\n new DaffAuthServerSide(this.errorMatcher(error)),\n new DaffResetPasswordFailure(this.errorMatcher(error)),\n );\n\n case error instanceof DaffStorageServiceError:\n return of(\n new DaffAuthStorageFailure(this.errorMatcher(error)),\n new DaffResetPasswordFailure(this.errorMatcher(error)),\n );\n\n default:\n return of(new DaffResetPasswordFailure(this.errorMatcher(error)));\n }\n }),\n ),\n ),\n ));\n}\n","import {\n inject,\n InjectionToken,\n} from '@angular/core';\nimport {\n ActionReducer,\n combineReducers,\n} from '@ngrx/store';\n\nimport { daffComposeReducers } from '@daffodil/core/state';\n\nimport { DAFF_AUTH_EXTRA_REDUCERS } from './extra.token';\nimport { DaffAuthFeatureState } from '../auth-feature-state.interface';\nimport { daffAuthReducers } from '../auth-reducers';\n\n/**\n * An internal token to hold the Daffodil auth reducers.\n * Includes the extra and standard reducers.\n *\n * @docs-private\n */\nexport const DAFF_AUTH_REDUCERS = new InjectionToken<ActionReducer<DaffAuthFeatureState>>(\n 'DAFF_AUTH_REDUCERS',\n {\n factory: () => daffComposeReducers([\n combineReducers(daffAuthReducers),\n ...inject(DAFF_AUTH_EXTRA_REDUCERS),\n ]),\n },\n);\n","import {\n ModuleWithProviders,\n NgModule,\n inject,\n} from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { of } from 'rxjs';\n\nimport { DaffAuthStorageService } from '@daffodil/auth';\n\nimport {\n DaffAuthStateConfig,\n daffAuthStateDefaultConfig,\n provideDaffAuthStateConfig,\n} from './config/public_api';\nimport { DaffAuthEffects } from './effects/auth.effects';\nimport { DaffAuthLoginEffects } from './effects/login.effects';\nimport { DaffAuthRegisterEffects } from './effects/register.effects';\nimport { DaffAuthResetPasswordEffects } from './effects/reset-password.effects';\nimport {\n DAFF_AUTH_UNAUTHENTICATED_HOOKS,\n DaffAuthUnauthenticatedHook,\n} from './injection-tokens/public_api';\nimport { DAFF_AUTH_STORE_FEATURE_KEY } from './reducers/public_api';\nimport { DAFF_AUTH_REDUCERS } from './reducers/token/reducers.token';\n\n\n@NgModule({\n imports: [\n StoreModule.forFeature(DAFF_AUTH_STORE_FEATURE_KEY, DAFF_AUTH_REDUCERS),\n EffectsModule.forFeature([\n DaffAuthEffects,\n DaffAuthLoginEffects,\n DaffAuthRegisterEffects,\n DaffAuthResetPasswordEffects,\n ]),\n ],\n providers: [\n {\n provide: DAFF_AUTH_UNAUTHENTICATED_HOOKS,\n useFactory: () => {\n const storage = inject(DaffAuthStorageService);\n const hook: DaffAuthUnauthenticatedHook = () => {\n try {\n return of(storage.removeAuthToken());\n } catch {\n return of(null);\n }\n };\n\n return hook;\n },\n multi: true,\n },\n ],\n})\nexport class DaffAuthStateModule {\n static withConfig(config: Partial<DaffAuthStateConfig> = {}): ModuleWithProviders<DaffAuthStateModule> {\n return {\n ngModule: DaffAuthStateModule,\n providers: [\n provideDaffAuthStateConfig({\n ...daffAuthStateDefaultConfig,\n ...config,\n }),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3","i1","i2"],"mappings":";;;;;;;;;;;;;;;;AAIY,IAAA,oBAQX;AARD,CAAA,UAAY,mBAAmB,EAAA;AAC7B,IAAA,mBAAA,CAAA,8BAAA,CAAA,GAAA,kDAAiF,CAAA;AACjF,IAAA,mBAAA,CAAA,0BAAA,CAAA,GAAA,8CAAyE,CAAA;AACzE,IAAA,mBAAA,CAAA,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ACZ,yBAAA;AACF,qBAAA;iBACF,CAAA;;;ACxDD;;AAEG;;;;"}
@@ -1,7 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Inject, InjectionToken } from '@angular/core';
2
+ import { Injectable, Inject } from '@angular/core';
3
3
  import { DaffPersistenceServiceToken, DaffInheritableError } from '@daffodil/core';
4
- import { daffTransformErrorToStateError } from '@daffodil/core/state';
5
4
 
6
5
  class DaffAuthStorageService {
7
6
  constructor(storageService) {
@@ -32,12 +31,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
32
31
  }] }];
33
32
  } });
34
33
 
35
- /**
36
- * Transforms `DaffError`s into `DaffStateError`s before they are serialized into state.
37
- * Can be used to further refine Daffodil errors into more specific app errors.
38
- */
39
- const DAFF_AUTH_ERROR_MATCHER = new InjectionToken('DAFF_AUTH_ERROR_MATCHER', { factory: () => daffTransformErrorToStateError });
40
-
41
34
  var DaffAuthErrorCodes;
42
35
  (function (DaffAuthErrorCodes) {
43
36
  DaffAuthErrorCodes["MISSING_TOKEN"] = "DAFF_AUTH_MISSING_TOKEN";
@@ -66,5 +59,5 @@ const DaffAuthErrorMap = {
66
59
  * Generated bundle index. Do not edit.
67
60
  */
68
61
 
69
- export { DAFF_AUTH_ERROR_MATCHER, DaffAuthErrorCodes, DaffAuthErrorMap, DaffAuthMissingTokenError, DaffAuthStorageService };
62
+ export { DaffAuthErrorCodes, DaffAuthErrorMap, DaffAuthMissingTokenError, DaffAuthStorageService };
70
63
  //# sourceMappingURL=daffodil-auth.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-auth.mjs","sources":["../../../libs/auth/src/storage/auth-storage.service.ts","../../../libs/auth/src/injection-tokens/error-matcher.token.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","import { InjectionToken } from '@angular/core';\n\nimport { daffTransformErrorToStateError } from '@daffodil/core/state';\n\n/**\n * Transforms `DaffError`s into `DaffStateError`s before they are serialized into state.\n * Can be used to further refine Daffodil errors into more specific app errors.\n */\nexport const DAFF_AUTH_ERROR_MATCHER = new InjectionToken<typeof daffTransformErrorToStateError>(\n 'DAFF_AUTH_ERROR_MATCHER',\n { factory: () => daffTransformErrorToStateError },\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,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AA,mBAEX;AAFD,CAAA,UAAY,kBAAkB,EAAA;AAC5B,IAAA,kBAAA,CAAA,eAAA,CAAA,GAAA,yBAAyC,CAAA;AAC3C,CAAC,EAFW,kBAAkB,KAAlB,kBAAkB,GAE7B,EAAA,CAAA,CAAA;;ACKD;;;AAGG;AACG,MAAO,yBAA0B,SAAQ,oBAAoB,CAAA;AAGjE,IAAA,WAAA,CAAmB,OAAe,EAAA;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;AADE,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAQ;AAFlB,QAAA,IAAA,CAAA,IAAI,GAAW,kBAAkB,CAAC,aAAa,CAAC;KAI/D;AACF;;ACdD;;AAEG;AACU,MAAA,gBAAgB,GAAG;AAC9B,IAAA,CAAC,kBAAkB,CAAC,aAAa,GAAG,yBAAyB;;;ACP/D;;AAEG;;;;"}
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;AAAtC,QAAA,IAAc,CAAA,cAAA,GAAd,cAAc,CAAwB;AAF9E,QAAA,IAAkB,CAAA,kBAAA,GAAG,iBAAiB,CAAC;KAE2C;IAEnG,YAAY,GAAA;QACV,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;KAC7D;AAED,IAAA,YAAY,CAAC,KAAa,EAAA;QACxB,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;KAC7D;IAED,eAAe,GAAA;QACb,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;KACzD;;AAfU,mBAAA,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,kBAGb,2BAA2B,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAHpC,mBAAA,sBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cAFrB,MAAM,EAAA,CAAA,CAAA;2FAEP,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;iBACnB,CAAA;;;8BAIc,MAAM;+BAAC,2BAA2B,CAAA;;;;AChBrC,IAAA,mBAEX;AAFD,CAAA,UAAY,kBAAkB,EAAA;AAC5B,IAAA,kBAAA,CAAA,eAAA,CAAA,GAAA,yBAAyC,CAAA;AAC3C,CAAC,EAFW,kBAAkB,KAAlB,kBAAkB,GAE7B,EAAA,CAAA,CAAA;;ACKD;;;AAGG;AACG,MAAO,yBAA0B,SAAQ,oBAAoB,CAAA;AAGjE,IAAA,WAAA,CAAmB,OAAe,EAAA;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;AADE,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAQ;AAFlB,QAAA,IAAA,CAAA,IAAI,GAAW,kBAAkB,CAAC,aAAa,CAAC;KAI/D;AACF;;ACdD;;AAEG;AACU,MAAA,gBAAgB,GAAG;AAC9B,IAAA,CAAC,kBAAkB,CAAC,aAAa,GAAG,yBAAyB;;;ACP/D;;AAEG;;;;"}
@@ -6,11 +6,10 @@ import * as i4 from '@ngrx/store';
6
6
  import { of, from, EMPTY } from 'rxjs';
7
7
  import { tap, map, catchError, filter, switchMap } from 'rxjs/operators';
8
8
  import * as i2 from '@daffodil/auth';
9
- import { DAFF_AUTH_ERROR_MATCHER } from '@daffodil/auth';
10
9
  import * as i1 from '@daffodil/auth/driver';
11
10
  import { DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES } from '@daffodil/auth/driver';
12
11
  import * as i1$1 from '@daffodil/auth/state';
13
- import { DaffAuthGuardLogout, DaffResetPasswordLanding, DaffAuthActionTypes, DaffAuthLoginActionTypes, DaffAuthRegisterActionTypes, DaffAuthResetPasswordActionTypes, DAFF_AUTH_UNAUTHENTICATED_HOOKS } from '@daffodil/auth/state';
12
+ import { DaffAuthGuardLogout, DAFF_AUTH_ERROR_MATCHER, DaffResetPasswordLanding, DaffAuthActionTypes, DaffAuthLoginActionTypes, DaffAuthRegisterActionTypes, DaffAuthResetPasswordActionTypes, DAFF_AUTH_UNAUTHENTICATED_HOOKS } from '@daffodil/auth/state';
14
13
  import * as i1$2 from '@ngrx/effects';
15
14
  import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
16
15
 
@@ -1 +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 {\n CanActivate,\n Router,\n} 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 {\n DAFF_AUTH_ERROR_MATCHER,\n DaffAuthStorageService,\n} from '@daffodil/auth';\nimport {\n DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES,\n DaffAuthDriverErrorCodes,\n DaffAuthDriverTokenCheck,\n} from '@daffodil/auth/driver';\nimport { DaffAuthGuardLogout } 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 implements CanActivate {\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 {\n CanActivate,\n Router,\n} 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 {\n DAFF_AUTH_ERROR_MATCHER,\n DaffAuthStorageService,\n} from '@daffodil/auth';\nimport {\n DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES,\n DaffAuthDriverErrorCodes,\n DaffAuthDriverTokenCheck,\n} from '@daffodil/auth/driver';\nimport { DaffAuthGuardLogout } 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 implements CanActivate {\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 {\n ActivatedRouteSnapshot,\n CanActivate,\n} 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 implements CanActivate {\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,M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A,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,6BAA6B,EAb7B,SAAA,EAAA;AACT,QAAA;AACE,YAAA,OAAO,EAAE,+BAA+B;AACxC,YAAA,KAAK,EAAE,IAAI;YACX,UAAU,GAAE,MACV,iDAAiD,CAC/C,MAAM,CAAC,MAAM,CAAC,EACd,MAAM,CAAC,cAAc,CAAC,EACtB,MAAM,CAAC,wBAAwB,CAAC,CACjC,CAAA;AACJ,SAAA;KACF,EAfC,OAAA,EAAA,CAAA,aAAa,CAAC,UAAU,CAAC;YACvB,uBAAuB;SACxB,CAAC,CAAA,EAAA,CAAA,CAAA;2FAeO,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAnBzC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,aAAa,CAAC,UAAU,CAAC;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;;;;"}
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 {\n CanActivate,\n Router,\n} 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 implements CanActivate {\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 {\n CanActivate,\n Router,\n} 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 implements CanActivate {\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 {\n ActivatedRouteSnapshot,\n CanActivate,\n} 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 implements CanActivate {\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;;MCoC5H,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,CACjC,GAAG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