@daffodil/auth 0.84.0 → 0.85.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/daffodil-auth-driver-in-memory.mjs +20 -20
- package/fesm2022/daffodil-auth-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-auth-driver-magento.mjs +23 -23
- package/fesm2022/daffodil-auth-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-auth-driver-testing.mjs +16 -16
- package/fesm2022/daffodil-auth-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-auth-driver.mjs +4 -4
- package/fesm2022/daffodil-auth-driver.mjs.map +1 -1
- package/fesm2022/daffodil-auth-routing.mjs +21 -21
- package/fesm2022/daffodil-auth-routing.mjs.map +1 -1
- package/fesm2022/daffodil-auth-state-testing.mjs +16 -16
- package/fesm2022/daffodil-auth-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-auth-state.mjs +28 -28
- package/fesm2022/daffodil-auth-state.mjs.map +1 -1
- package/fesm2022/daffodil-auth-testing.mjs +13 -13
- package/fesm2022/daffodil-auth-testing.mjs.map +1 -1
- package/fesm2022/daffodil-auth.mjs +4 -4
- package/fesm2022/daffodil-auth.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -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/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 return {\n ...daffOperationFailed([action.errorMessage], state),\n loggedIn: false,\n };\n\n case DaffAuthActionTypes.AuthGuardLogoutAction:\n return {\n ...daffCompleteOperation(state),\n daffErrors: [action.errorMessage],\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 { ActionReducer } from '@ngrx/store';\n\nimport { createMultiInjectionToken } from '@daffodil/core';\n\nimport { DaffAuthFeatureState } from '../auth-feature-state.interface';\n\nexport const {\n /**\n * A token to hold the injectable extra reducers.\n *\n * Prefer using {@link daffAuthProvideExtraReducers}.\n */\n token: DAFF_AUTH_EXTRA_REDUCERS,\n\n /**\n * Provides additional reducers that run after the standard Daffodil auth reducers.\n *\n * @example\n * ```ts\n * providers: [\n * ...daffAuthProvideExtraReducers(\n * myReducer1,\n * myReducer2\n * )\n * ]\n * ```\n */\n provider: daffAuthProvideExtraReducers,\n} = createMultiInjectionToken<ActionReducer<DaffAuthFeatureState>>('DAFF_AUTH_EXTRA_REDUCERS');\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} 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 { createConfigInjectionToken } from '@daffodil/core';\n\nimport { daffAuthStateDefaultConfig } from './default';\nimport { DaffAuthStateConfig } from './type';\n\nexport const {\n token: DAFF_AUTH_STATE_CONFIG,\n /**\n * Provider function for {@link DAFF_AUTH_STATE_CONFIG}.\n */\n provider: provideDaffAuthStateConfig,\n} = createConfigInjectionToken<DaffAuthStateConfig>(daffAuthStateDefaultConfig, 'DAFF_AUTH_STATE_CONFIG');\n","import { createMultiInjectionToken } from '@daffodil/core';\n\nimport { DaffAuthUnauthenticatedHook } from './hook.type';\n\nexport const {\n /**\n * A token to hold the unauthenticated hooks.\n * See {@link DaffAuthUnauthenticatedHook}.\n *\n * Prefer using {@link daffAuthProvideUnauthenticatedHooks}.\n */\n token: DAFF_AUTH_UNAUTHENTICATED_HOOKS,\n /**\n * Provides {@link DAFF_AUTH_UNAUTHENTICATED_HOOKS}.\n *\n * @example\n * ```ts\n * providers: [\n * ...daffAuthProvideUnauthenticatedHooks(\n * myHook1,\n * myHook2\n * )\n * ]\n * ```\n */\n provider: daffAuthProvideUnauthenticatedHooks,\n} = createMultiInjectionToken<DaffAuthUnauthenticatedHook>('DAFF_AUTH_UNAUTHENTICATED_HOOKS');\n\n","import { createSingleInjectionToken } from '@daffodil/core';\nimport { daffTransformErrorToStateError } from '@daffodil/core/state';\n\nexport const {\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 */\n token: DAFF_AUTH_ERROR_MATCHER,\n /**\n * Provider function for {@link DAFF_AUTH_ERROR_MATCHER}.\n */\n provider: provideDaffAuthErrorMatcher,\n} = createSingleInjectionToken<typeof daffTransformErrorToStateError>(\n 'DAFF_AUTH_ERROR_MATCHER',\n { factory: () => daffTransformErrorToStateError },\n);\n","import { inject } from '@angular/core';\nimport { combineLatest } from 'rxjs';\n\nimport { createSingleInjectionToken } from '@daffodil/core';\n\nimport { DaffAuthUnauthenticatedHook } from './hook.type';\nimport { DAFF_AUTH_UNAUTHENTICATED_HOOKS } from './hooks.token';\n\nexport const {\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 */\n token: DAFF_AUTH_UNAUTHENTICATED_HOOK,\n /**\n * Provider function for {@link DAFF_AUTH_UNAUTHENTICATED_HOOK}.\n */\n provider: provideDaffAuthUnauthenticatedHook,\n} = createSingleInjectionToken<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 NgZone,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n of,\n EMPTY,\n Observable,\n} from 'rxjs';\nimport {\n switchMap,\n catchError,\n map,\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 private zone: NgZone,\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(() =>\n new Observable<DaffAuthCheck>((subscriber) => {\n const intervalId = this.zone.runOutsideAngular(() =>\n setInterval(() => {\n subscriber.next(new DaffAuthCheck());\n }, this.config.checkInterval),\n );\n\n subscriber.next(new DaffAuthCheck());\n\n return () => {\n clearInterval(intervalId);\n };\n }).pipe(\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\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 { inject } from '@angular/core';\nimport {\n ActionReducer,\n combineReducers,\n} from '@ngrx/store';\n\nimport { createSingleInjectionToken } from '@daffodil/core';\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\nexport const {\n /**\n * An internal token to hold the Daffodil auth reducers.\n * Includes the extra and standard reducers.\n *\n * @docs-private\n */\n token: DAFF_AUTH_REDUCERS,\n /**\n * Provider function for {@link DAFF_AUTH_REDUCERS}.\n */\n provider: provideDaffAuthReducers,\n} = createSingleInjectionToken<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":";;;;;;;;;;;;;;;;IAIY;AAAZ,CAAA,UAAY,mBAAmB,EAAA;AAC7B,IAAA,mBAAA,CAAA,8BAAA,CAAA,GAAA,kDAAiF;AACjF,IAAA,mBAAA,CAAA,0BAAA,CAAA,GAAA,8CAAyE;AACzE,IAAA,mBAAA,CAAA,uBAAA,CAAA,GAAA,2CAAmE;AACnE,IAAA,mBAAA,CAAA,sBAAA,CAAA,GAAA,0CAAiE;AACjE,IAAA,mBAAA,CAAA,iBAAA,CAAA,GAAA,oCAAsD;AACtD,IAAA,mBAAA,CAAA,wBAAA,CAAA,GAAA,4CAAqE;AACrE,IAAA,mBAAA,CAAA,wBAAA,CAAA,GAAA,4CAAqE;AACvE,CAAC,EARW,mBAAmB,KAAnB,mBAAmB,GAQ9B,EAAA,CAAA,CAAA;AAED;;;AAGG;MACU,8BAA8B,CAAA;AAGzC,IAAA,WAAA,CACS,MAAsB,EAAA;QAAtB,IAAM,CAAA,MAAA,GAAN,MAAM;AAHN,QAAA,IAAA,CAAA,IAAI,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BACpB,uBAAuB;4BACvB,4BAA4B;yBAC7B,CAAC;AACH,qBAAA;AACD,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,+BAA+B;4BACxC,UAAU,GAAE,MAAK;AACf,gCAAA,MAAM,OAAO,GAAG,MAAM,CAAC,sBAAsB,CAAC;gCAC9C,MAAM,IAAI,IAAgC,MAAK;AAC7C,oCAAA,IAAI;AACF,wCAAA,OAAO,EAAE,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC;;AACpC,oCAAA,MAAM;AACN,wCAAA,OAAO,EAAE,CAAC,IAAI,CAAC;;AAEnB,iCAAC,CAAA;AAED,gCAAA,OAAO,IAAI;AACb,6BAAC,CAAA;AACD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA;AACF,iBAAA;;;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 return {\n ...daffOperationFailed([action.errorMessage], state),\n loggedIn: false,\n };\n\n case DaffAuthActionTypes.AuthGuardLogoutAction:\n return {\n ...daffCompleteOperation(state),\n daffErrors: [action.errorMessage],\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 { ActionReducer } from '@ngrx/store';\n\nimport { createMultiInjectionToken } from '@daffodil/core';\n\nimport { DaffAuthFeatureState } from '../auth-feature-state.interface';\n\nexport const {\n /**\n * A token to hold the injectable extra reducers.\n *\n * Prefer using {@link daffAuthProvideExtraReducers}.\n */\n token: DAFF_AUTH_EXTRA_REDUCERS,\n\n /**\n * Provides additional reducers that run after the standard Daffodil auth reducers.\n *\n * @example\n * ```ts\n * providers: [\n * ...daffAuthProvideExtraReducers(\n * myReducer1,\n * myReducer2\n * )\n * ]\n * ```\n */\n provider: daffAuthProvideExtraReducers,\n} = createMultiInjectionToken<ActionReducer<DaffAuthFeatureState>>('DAFF_AUTH_EXTRA_REDUCERS');\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} 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 { createConfigInjectionToken } from '@daffodil/core';\n\nimport { daffAuthStateDefaultConfig } from './default';\nimport { DaffAuthStateConfig } from './type';\n\nexport const {\n token: DAFF_AUTH_STATE_CONFIG,\n /**\n * Provider function for {@link DAFF_AUTH_STATE_CONFIG}.\n */\n provider: provideDaffAuthStateConfig,\n} = createConfigInjectionToken<DaffAuthStateConfig>(daffAuthStateDefaultConfig, 'DAFF_AUTH_STATE_CONFIG');\n","import { createMultiInjectionToken } from '@daffodil/core';\n\nimport { DaffAuthUnauthenticatedHook } from './hook.type';\n\nexport const {\n /**\n * A token to hold the unauthenticated hooks.\n * See {@link DaffAuthUnauthenticatedHook}.\n *\n * Prefer using {@link daffAuthProvideUnauthenticatedHooks}.\n */\n token: DAFF_AUTH_UNAUTHENTICATED_HOOKS,\n /**\n * Provides {@link DAFF_AUTH_UNAUTHENTICATED_HOOKS}.\n *\n * @example\n * ```ts\n * providers: [\n * ...daffAuthProvideUnauthenticatedHooks(\n * myHook1,\n * myHook2\n * )\n * ]\n * ```\n */\n provider: daffAuthProvideUnauthenticatedHooks,\n} = createMultiInjectionToken<DaffAuthUnauthenticatedHook>('DAFF_AUTH_UNAUTHENTICATED_HOOKS');\n\n","import { createSingleInjectionToken } from '@daffodil/core';\nimport { daffTransformErrorToStateError } from '@daffodil/core/state';\n\nexport const {\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 */\n token: DAFF_AUTH_ERROR_MATCHER,\n /**\n * Provider function for {@link DAFF_AUTH_ERROR_MATCHER}.\n */\n provider: provideDaffAuthErrorMatcher,\n} = createSingleInjectionToken<typeof daffTransformErrorToStateError>(\n 'DAFF_AUTH_ERROR_MATCHER',\n { factory: () => daffTransformErrorToStateError },\n);\n","import { inject } from '@angular/core';\nimport { combineLatest } from 'rxjs';\n\nimport { createSingleInjectionToken } from '@daffodil/core';\n\nimport { DaffAuthUnauthenticatedHook } from './hook.type';\nimport { DAFF_AUTH_UNAUTHENTICATED_HOOKS } from './hooks.token';\n\nexport const {\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 */\n token: DAFF_AUTH_UNAUTHENTICATED_HOOK,\n /**\n * Provider function for {@link DAFF_AUTH_UNAUTHENTICATED_HOOK}.\n */\n provider: provideDaffAuthUnauthenticatedHook,\n} = createSingleInjectionToken<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 NgZone,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n of,\n EMPTY,\n Observable,\n} from 'rxjs';\nimport {\n switchMap,\n catchError,\n map,\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 private zone: NgZone,\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(() =>\n new Observable<DaffAuthCheck>((subscriber) => {\n const intervalId = this.zone.runOutsideAngular(() =>\n setInterval(() => {\n subscriber.next(new DaffAuthCheck());\n }, this.config.checkInterval),\n );\n\n subscriber.next(new DaffAuthCheck());\n\n return () => {\n clearInterval(intervalId);\n };\n }).pipe(\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\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 { inject } from '@angular/core';\nimport {\n ActionReducer,\n combineReducers,\n} from '@ngrx/store';\n\nimport { createSingleInjectionToken } from '@daffodil/core';\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\nexport const {\n /**\n * An internal token to hold the Daffodil auth reducers.\n * Includes the extra and standard reducers.\n *\n * @docs-private\n */\n token: DAFF_AUTH_REDUCERS,\n /**\n * Provider function for {@link DAFF_AUTH_REDUCERS}.\n */\n provider: provideDaffAuthReducers,\n} = createSingleInjectionToken<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":";;;;;;;;;;;;;;;;IAIY;AAAZ,CAAA,UAAY,mBAAmB,EAAA;AAC7B,IAAA,mBAAA,CAAA,8BAAA,CAAA,GAAA,kDAAiF;AACjF,IAAA,mBAAA,CAAA,0BAAA,CAAA,GAAA,8CAAyE;AACzE,IAAA,mBAAA,CAAA,uBAAA,CAAA,GAAA,2CAAmE;AACnE,IAAA,mBAAA,CAAA,sBAAA,CAAA,GAAA,0CAAiE;AACjE,IAAA,mBAAA,CAAA,iBAAA,CAAA,GAAA,oCAAsD;AACtD,IAAA,mBAAA,CAAA,wBAAA,CAAA,GAAA,4CAAqE;AACrE,IAAA,mBAAA,CAAA,wBAAA,CAAA,GAAA,4CAAqE;AACvE,CAAC,EARW,mBAAmB,KAAnB,mBAAmB,GAQ9B,EAAA,CAAA,CAAA;AAED;;;AAGG;MACU,8BAA8B,CAAA;AAGzC,IAAA,WAAA,CACS,MAAsB,EAAA;QAAtB,IAAM,CAAA,MAAA,GAAN,MAAM;AAHN,QAAA,IAAA,CAAA,IAAI,GAAG,mBAAmB,CAAC,4BAA4B;;AAKjE;AAED;;AAEG;MACU,sBAAsB,CAAA;AAGjC,IAAA,WAAA,CAAmB,YAA4B,EAAA;QAA5B,IAAY,CAAA,YAAA,GAAZ,YAAY;AAFtB,QAAA,IAAA,CAAA,IAAI,GAAG,mBAAmB,CAAC,wBAAwB;;AAG7D;AAED;;AAEG;MACU,mBAAmB,CAAA;AAG9B,IAAA,WAAA,CAAmB,YAA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O,EAAE,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC;;AACpC,oCAAA,MAAM;AACN,wCAAA,OAAO,EAAE,CAAC,IAAI,CAAC;;AAEnB,iCAAC,CAAA;AAED,gCAAA,OAAO,IAAI;AACb,6BAAC,CAAA;AACD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA;AACF,iBAAA;;;ACxDD;;AAEG;;;;"}
|
|
@@ -6,7 +6,7 @@ import { DaffModelFactory } from '@daffodil/core/testing';
|
|
|
6
6
|
class MockAccountRegistration {
|
|
7
7
|
constructor() {
|
|
8
8
|
this.email = faker.internet.email();
|
|
9
|
-
this.password = faker.
|
|
9
|
+
this.password = faker.string.alphanumeric(16);
|
|
10
10
|
this.subscribe = faker.datatype.boolean();
|
|
11
11
|
this.firstName = faker.name.firstName();
|
|
12
12
|
this.lastName = faker.name.lastName();
|
|
@@ -17,10 +17,10 @@ class DaffAccountRegistrationFactory extends DaffModelFactory {
|
|
|
17
17
|
constructor() {
|
|
18
18
|
super(MockAccountRegistration);
|
|
19
19
|
}
|
|
20
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
21
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
20
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAccountRegistrationFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
21
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAccountRegistrationFactory, providedIn: 'root' }); }
|
|
22
22
|
}
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAccountRegistrationFactory, decorators: [{
|
|
24
24
|
type: Injectable,
|
|
25
25
|
args: [{
|
|
26
26
|
providedIn: 'root',
|
|
@@ -29,7 +29,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
29
29
|
|
|
30
30
|
class MockAuthToken {
|
|
31
31
|
constructor() {
|
|
32
|
-
this.token = faker.
|
|
32
|
+
this.token = faker.string.alphanumeric(16);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
;
|
|
@@ -37,10 +37,10 @@ class DaffAuthTokenFactory extends DaffModelFactory {
|
|
|
37
37
|
constructor() {
|
|
38
38
|
super(MockAuthToken);
|
|
39
39
|
}
|
|
40
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
41
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
40
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthTokenFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
41
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthTokenFactory, providedIn: 'root' }); }
|
|
42
42
|
}
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthTokenFactory, decorators: [{
|
|
44
44
|
type: Injectable,
|
|
45
45
|
args: [{
|
|
46
46
|
providedIn: 'root',
|
|
@@ -50,8 +50,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
50
50
|
class MockAuthResetPasswordInfo {
|
|
51
51
|
constructor() {
|
|
52
52
|
this.email = faker.internet.email();
|
|
53
|
-
this.password = faker.
|
|
54
|
-
this.token = faker.
|
|
53
|
+
this.password = faker.string.alphanumeric(16);
|
|
54
|
+
this.token = faker.string.alphanumeric(16);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
;
|
|
@@ -59,10 +59,10 @@ class DaffAuthResetPasswordInfoFactory extends DaffModelFactory {
|
|
|
59
59
|
constructor() {
|
|
60
60
|
super(MockAuthResetPasswordInfo);
|
|
61
61
|
}
|
|
62
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
63
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
62
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthResetPasswordInfoFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
63
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthResetPasswordInfoFactory, providedIn: 'root' }); }
|
|
64
64
|
}
|
|
65
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthResetPasswordInfoFactory, decorators: [{
|
|
66
66
|
type: Injectable,
|
|
67
67
|
args: [{
|
|
68
68
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-auth-testing.mjs","sources":["../../../libs/auth/testing/src/factories/account-registration.factory.ts","../../../libs/auth/testing/src/factories/auth-token.factory.ts","../../../libs/auth/testing/src/factories/reset-password-info.factory.ts","../../../libs/auth/testing/src/daffodil-auth-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\nimport { DaffModelFactory } from '@daffodil/core/testing';\n\nexport class MockAccountRegistration implements DaffAccountRegistration {\n email = faker.internet.email();\n password = faker.
|
|
1
|
+
{"version":3,"file":"daffodil-auth-testing.mjs","sources":["../../../libs/auth/testing/src/factories/account-registration.factory.ts","../../../libs/auth/testing/src/factories/auth-token.factory.ts","../../../libs/auth/testing/src/factories/reset-password-info.factory.ts","../../../libs/auth/testing/src/daffodil-auth-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\nimport { DaffModelFactory } from '@daffodil/core/testing';\n\nexport class MockAccountRegistration implements DaffAccountRegistration {\n email = faker.internet.email();\n password = faker.string.alphanumeric(16);\n subscribe = faker.datatype.boolean();\n firstName = faker.name.firstName();\n lastName = faker.name.lastName();\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAccountRegistrationFactory extends DaffModelFactory<DaffAccountRegistration> {\n constructor() {\n super(MockAccountRegistration);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffAuthToken } from '@daffodil/auth';\nimport { DaffModelFactory } from '@daffodil/core/testing';\n\nexport class MockAuthToken implements DaffAuthToken {\n token = faker.string.alphanumeric(16);\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthTokenFactory extends DaffModelFactory<DaffAuthToken> {\n constructor() {\n super(MockAuthToken);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffModelFactory } from '@daffodil/core/testing';\n\nexport class MockAuthResetPasswordInfo implements DaffAuthResetPasswordInfo {\n email = faker.internet.email();\n password = faker.string.alphanumeric(16);\n token = faker.string.alphanumeric(16);\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthResetPasswordInfoFactory extends DaffModelFactory<DaffAuthResetPasswordInfo> {\n constructor() {\n super(MockAuthResetPasswordInfo);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAMa,uBAAuB,CAAA;AAApC,IAAA,WAAA,GAAA;AACE,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE;QAC9B,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;AACxC,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE;AACpC,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE;AAClC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE;;AACjC;AAAA;AAKK,MAAO,8BAA+B,SAAQ,gBAAyC,CAAA;AAC3F,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,uBAAuB,CAAC;;kIAFrB,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA9B,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,8BAA8B,cAF7B,MAAM,EAAA,CAAA,CAAA;;4FAEP,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAH1C,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;MCVY,aAAa,CAAA;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QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,cAF/B,MAAM,EAAA,CAAA,CAAA;;4FAEP,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAH5C,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACdD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Inject, Injectable } from '@angular/core';
|
|
3
3
|
import { DaffPersistenceServiceToken, DaffInheritableError } from '@daffodil/core';
|
|
4
4
|
|
|
5
5
|
class DaffAuthStorageService {
|
|
@@ -16,10 +16,10 @@ class DaffAuthStorageService {
|
|
|
16
16
|
removeAuthToken() {
|
|
17
17
|
this.storageService.removeItem(this.AUTH_STORAGE_TOKEN);
|
|
18
18
|
}
|
|
19
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
20
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
19
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthStorageService, deps: [{ token: DaffPersistenceServiceToken }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
20
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthStorageService, providedIn: 'root' }); }
|
|
21
21
|
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthStorageService, decorators: [{
|
|
23
23
|
type: Injectable,
|
|
24
24
|
args: [{
|
|
25
25
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-auth.mjs","sources":["../../../libs/auth/src/storage/auth-storage.service.ts","../../../libs/auth/src/errors/codes.enum.ts","../../../libs/auth/src/errors/missing-token.ts","../../../libs/auth/src/errors/map.ts","../../../libs/auth/src/daffodil-auth.ts"],"sourcesContent":["import {\n Injectable,\n Inject,\n} from '@angular/core';\n\nimport {\n DaffPersistenceService,\n DaffPersistenceServiceToken,\n} from '@daffodil/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthStorageService {\n private readonly AUTH_STORAGE_TOKEN = 'DAFF_AUTH_TOKEN';\n\n constructor(@Inject(DaffPersistenceServiceToken) private storageService: DaffPersistenceService) {}\n\n getAuthToken(): string {\n return this.storageService.getItem(this.AUTH_STORAGE_TOKEN);\n }\n\n setAuthToken(value: string): void {\n this.storageService.setItem(this.AUTH_STORAGE_TOKEN, value);\n }\n\n removeAuthToken(): void {\n this.storageService.removeItem(this.AUTH_STORAGE_TOKEN);\n }\n}\n","export enum DaffAuthErrorCodes {\n MISSING_TOKEN = 'DAFF_AUTH_MISSING_TOKEN',\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffAuthErrorCodes } from './codes.enum';\n\n/**\n * An error thrown when an authenticated action was initiated\n * but an auth token was not present.\n */\nexport class DaffAuthMissingTokenError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffAuthErrorCodes.MISSING_TOKEN;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import { DaffAuthErrorCodes } from './codes.enum';\nimport { DaffAuthMissingTokenError } from './missing-token';\n\n/**\n * A mapping from error codes to error class constructors.\n */\nexport const DaffAuthErrorMap = {\n [DaffAuthErrorCodes.MISSING_TOKEN]: DaffAuthMissingTokenError,\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAaa,sBAAsB,CAAA;AAGjC,IAAA,WAAA,CAAyD,cAAsC,EAAA;QAAtC,IAAc,CAAA,cAAA,GAAd,cAAc;QAFtD,IAAkB,CAAA,kBAAA,GAAG,iBAAiB;;IAIvD,YAAY,GAAA;QACV,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC;;AAG7D,IAAA,YAAY,CAAC,KAAa,EAAA;QACxB,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,KAAK,CAAC;;IAG7D,eAAe,GAAA;QACb,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,kBAAkB,CAAC;;AAd9C,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,
|
|
1
|
+
{"version":3,"file":"daffodil-auth.mjs","sources":["../../../libs/auth/src/storage/auth-storage.service.ts","../../../libs/auth/src/errors/codes.enum.ts","../../../libs/auth/src/errors/missing-token.ts","../../../libs/auth/src/errors/map.ts","../../../libs/auth/src/daffodil-auth.ts"],"sourcesContent":["import {\n Injectable,\n Inject,\n} from '@angular/core';\n\nimport {\n DaffPersistenceService,\n DaffPersistenceServiceToken,\n} from '@daffodil/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthStorageService {\n private readonly AUTH_STORAGE_TOKEN = 'DAFF_AUTH_TOKEN';\n\n constructor(@Inject(DaffPersistenceServiceToken) private storageService: DaffPersistenceService) {}\n\n getAuthToken(): string {\n return this.storageService.getItem(this.AUTH_STORAGE_TOKEN);\n }\n\n setAuthToken(value: string): void {\n this.storageService.setItem(this.AUTH_STORAGE_TOKEN, value);\n }\n\n removeAuthToken(): void {\n this.storageService.removeItem(this.AUTH_STORAGE_TOKEN);\n }\n}\n","export enum DaffAuthErrorCodes {\n MISSING_TOKEN = 'DAFF_AUTH_MISSING_TOKEN',\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffAuthErrorCodes } from './codes.enum';\n\n/**\n * An error thrown when an authenticated action was initiated\n * but an auth token was not present.\n */\nexport class DaffAuthMissingTokenError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffAuthErrorCodes.MISSING_TOKEN;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import { DaffAuthErrorCodes } from './codes.enum';\nimport { DaffAuthMissingTokenError } from './missing-token';\n\n/**\n * A mapping from error codes to error class constructors.\n */\nexport const DaffAuthErrorMap = {\n [DaffAuthErrorCodes.MISSING_TOKEN]: DaffAuthMissingTokenError,\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAaa,sBAAsB,CAAA;AAGjC,IAAA,WAAA,CAAyD,cAAsC,EAAA;QAAtC,IAAc,CAAA,cAAA,GAAd,cAAc;QAFtD,IAAkB,CAAA,kBAAA,GAAG,iBAAiB;;IAIvD,YAAY,GAAA;QACV,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC;;AAG7D,IAAA,YAAY,CAAC,KAAa,EAAA;QACxB,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,KAAK,CAAC;;IAG7D,eAAe,GAAA;QACb,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,kBAAkB,CAAC;;AAd9C,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,kBAGb,2BAA2B,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAHpC,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cAFrB,MAAM,EAAA,CAAA,CAAA;;4FAEP,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;0BAIc,MAAM;2BAAC,2BAA2B;;;IChBrC;AAAZ,CAAA,UAAY,kBAAkB,EAAA;AAC5B,IAAA,kBAAA,CAAA,eAAA,CAAA,GAAA,yBAAyC;AAC3C,CAAC,EAFW,kBAAkB,KAAlB,kBAAkB,GAE7B,EAAA,CAAA,CAAA;;ACKD;;;AAGG;AACG,MAAO,yBAA0B,SAAQ,oBAAoB,CAAA;AAGjE,IAAA,WAAA,CAAmB,OAAe,EAAA;QAChC,KAAK,CAAC,OAAO,CAAC;QADG,IAAO,CAAA,OAAA,GAAP,OAAO;AAFV,QAAA,IAAA,CAAA,IAAI,GAAW,kBAAkB,CAAC,aAAa;;AAKhE;;ACdD;;AAEG;AACU,MAAA,gBAAgB,GAAG;AAC9B,IAAA,CAAC,kBAAkB,CAAC,aAAa,GAAG,yBAAyB;;;ACP/D;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@daffodil/auth","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/auth"]}}},"version":"0.
|
|
1
|
+
{"name":"@daffodil/auth","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/auth"]}}},"version":"0.85.0","description":"Reducers, State, Selectors, and Drivers for logging in and registering users.","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"publishConfig":{"directory":"../../dist/auth"},"homepage":"https://github.com/graycoreio/daffodil","peerDependencies":{"@angular/common":"^19.0.0","@angular/core":"^19.0.0","@daffodil/core":"0.85.0","@ngrx/store":"^19.0.0","rxjs":"7.8.1"},"optionalDependencies":{"@daffodil/driver":"0.85.0"},"module":"fesm2022/daffodil-auth.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","default":"./fesm2022/daffodil-auth.mjs"},"./driver":{"types":"./driver/index.d.ts","default":"./fesm2022/daffodil-auth-driver.mjs"},"./routing":{"types":"./routing/index.d.ts","default":"./fesm2022/daffodil-auth-routing.mjs"},"./state":{"types":"./state/index.d.ts","default":"./fesm2022/daffodil-auth-state.mjs"},"./testing":{"types":"./testing/index.d.ts","default":"./fesm2022/daffodil-auth-testing.mjs"},"./driver/in-memory":{"types":"./driver/in-memory/index.d.ts","default":"./fesm2022/daffodil-auth-driver-in-memory.mjs"},"./driver/magento":{"types":"./driver/magento/index.d.ts","default":"./fesm2022/daffodil-auth-driver-magento.mjs"},"./driver/testing":{"types":"./driver/testing/index.d.ts","default":"./fesm2022/daffodil-auth-driver-testing.mjs"},"./state/testing":{"types":"./state/testing/index.d.ts","default":"./fesm2022/daffodil-auth-state-testing.mjs"}},"sideEffects":false,"dependencies":{"tslib":"^2.3.0"}}
|