@daffodil/auth 0.57.0 → 0.58.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/driver/public_api.d.ts +1 -0
  2. package/driver/services/auth-check.service.d.ts +17 -0
  3. package/driver/services/public_api.d.ts +1 -0
  4. package/errors/codes.enum.d.ts +3 -0
  5. package/errors/map.d.ts +7 -0
  6. package/errors/missing-token.d.ts +10 -0
  7. package/errors/public_api.d.ts +3 -0
  8. package/esm2020/driver/public_api.mjs +2 -1
  9. package/esm2020/driver/services/auth-check.service.mjs +38 -0
  10. package/esm2020/driver/services/public_api.mjs +2 -0
  11. package/esm2020/errors/codes.enum.mjs +5 -0
  12. package/esm2020/errors/map.mjs +9 -0
  13. package/esm2020/errors/missing-token.mjs +14 -0
  14. package/esm2020/errors/public_api.mjs +4 -0
  15. package/esm2020/public_api.mjs +2 -1
  16. package/esm2020/routing/config/default.mjs +2 -1
  17. package/esm2020/routing/config/interface.mjs +1 -1
  18. package/esm2020/routing/effects/redirect.effects.mjs +13 -5
  19. package/esm2020/routing/guards/guest-only.guard.mjs +28 -15
  20. package/esm2020/routing/guards/member-only.guard.mjs +28 -15
  21. package/esm2020/state/actions/auth.actions.mjs +11 -40
  22. package/esm2020/state/actions/reset-password.actions.mjs +3 -2
  23. package/esm2020/state/effects/auth.effects.mjs +22 -23
  24. package/esm2020/state/effects/login.effects.mjs +7 -7
  25. package/esm2020/state/effects/register.effects.mjs +3 -3
  26. package/esm2020/state/effects/reset-password.effects.mjs +3 -3
  27. package/esm2020/state/reducers/auth/auth.reducer.mjs +11 -4
  28. package/fesm2015/daffodil-auth-driver.mjs +40 -2
  29. package/fesm2015/daffodil-auth-driver.mjs.map +1 -1
  30. package/fesm2015/daffodil-auth-routing.mjs +63 -31
  31. package/fesm2015/daffodil-auth-routing.mjs.map +1 -1
  32. package/fesm2015/daffodil-auth-state.mjs +52 -77
  33. package/fesm2015/daffodil-auth-state.mjs.map +1 -1
  34. package/fesm2015/daffodil-auth.mjs +26 -2
  35. package/fesm2015/daffodil-auth.mjs.map +1 -1
  36. package/fesm2020/daffodil-auth-driver.mjs +38 -2
  37. package/fesm2020/daffodil-auth-driver.mjs.map +1 -1
  38. package/fesm2020/daffodil-auth-routing.mjs +62 -30
  39. package/fesm2020/daffodil-auth-routing.mjs.map +1 -1
  40. package/fesm2020/daffodil-auth-state.mjs +55 -77
  41. package/fesm2020/daffodil-auth-state.mjs.map +1 -1
  42. package/fesm2020/daffodil-auth.mjs +26 -2
  43. package/fesm2020/daffodil-auth.mjs.map +1 -1
  44. package/package.json +3 -3
  45. package/public_api.d.ts +1 -0
  46. package/routing/config/interface.d.ts +5 -0
  47. package/routing/effects/redirect.effects.d.ts +3 -1
  48. package/routing/guards/guest-only.guard.d.ts +9 -5
  49. package/routing/guards/member-only.guard.d.ts +9 -5
  50. package/state/actions/auth.actions.d.ts +8 -34
  51. package/state/actions/reset-password.actions.d.ts +2 -0
  52. package/state/effects/auth.effects.d.ts +10 -9
  53. package/state/effects/login.effects.d.ts +4 -4
  54. package/state/effects/register.effects.d.ts +2 -1
  55. package/state/effects/reset-password.effects.d.ts +2 -2
  56. package/state/reducers/auth/auth.reducer.d.ts +2 -2
@@ -1,22 +1,23 @@
1
1
  import { Actions } from '@ngrx/effects';
2
- import { Observable } from 'rxjs';
3
2
  import { DaffAuthStorageService } from '@daffodil/auth';
4
- import { DaffAuthServiceInterface } from '@daffodil/auth/driver';
3
+ import { DaffAuthDriverTokenCheck } from '@daffodil/auth/driver';
5
4
  import { ErrorTransformer } from '@daffodil/core/state';
6
- import { DaffAuthCheckSuccess, DaffAuthCheckFailure, DaffAuthCheck, DaffAuthGuardCheckCompletion, DaffAuthStorageFailure, DaffAuthServerSide, DaffAuthRevoke } from '../actions/public_api';
5
+ import { DaffDriverHttpClientCacheServiceInterface } from '@daffodil/driver';
6
+ import { DaffAuthCheckSuccess, DaffAuthCheckFailure, DaffAuthCheck, DaffAuthStorageFailure, DaffAuthServerSide, DaffAuthActions, DaffAuthLoginActions } from '../actions/public_api';
7
7
  import { DaffAuthStateConfig } from '../config/public_api';
8
8
  import * as i0 from "@angular/core";
9
9
  export declare class DaffAuthEffects {
10
10
  private actions$;
11
- private authDriver;
11
+ private tokenCheck;
12
12
  private errorMatcher;
13
13
  private storage;
14
14
  private config;
15
- constructor(actions$: Actions, authDriver: DaffAuthServiceInterface, errorMatcher: ErrorTransformer, storage: DaffAuthStorageService, config: DaffAuthStateConfig);
16
- check$: Observable<DaffAuthCheckSuccess | DaffAuthCheckFailure> & import("@ngrx/effects").CreateEffectMetadata;
17
- guardCheck$: Observable<DaffAuthGuardCheckCompletion> & import("@ngrx/effects").CreateEffectMetadata;
18
- removeAuthToken$: Observable<DaffAuthStorageFailure | DaffAuthServerSide | DaffAuthRevoke> & import("@ngrx/effects").CreateEffectMetadata;
19
- authCheckInterval$: Observable<DaffAuthStorageFailure | DaffAuthServerSide | DaffAuthCheck> & import("@ngrx/effects").CreateEffectMetadata;
15
+ private clientCache;
16
+ constructor(actions$: Actions<DaffAuthActions | DaffAuthLoginActions>, tokenCheck: DaffAuthDriverTokenCheck, errorMatcher: ErrorTransformer, storage: DaffAuthStorageService, config: DaffAuthStateConfig, clientCache: DaffDriverHttpClientCacheServiceInterface);
17
+ check$: import("rxjs").Observable<DaffAuthCheckSuccess | DaffAuthCheckFailure> & import("@ngrx/effects").CreateEffectMetadata;
18
+ removeAuthToken$: import("rxjs").Observable<DaffAuthStorageFailure | DaffAuthServerSide> & import("@ngrx/effects").CreateEffectMetadata;
19
+ authCheckInterval$: import("rxjs").Observable<DaffAuthStorageFailure | DaffAuthServerSide | DaffAuthCheck> & import("@ngrx/effects").CreateEffectMetadata;
20
+ clearClientCache$: import("rxjs").Observable<never> & import("@ngrx/effects").CreateEffectMetadata;
20
21
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthEffects, never>;
21
22
  static ɵprov: i0.ɵɵInjectableDeclaration<DaffAuthEffects>;
22
23
  }
@@ -3,18 +3,18 @@ import { Observable } from 'rxjs';
3
3
  import { DaffLoginInfo, DaffAuthToken, DaffAuthStorageService } from '@daffodil/auth';
4
4
  import { DaffLoginServiceInterface } from '@daffodil/auth/driver';
5
5
  import { ErrorTransformer } from '@daffodil/core/state';
6
- import { DaffAuthLoginSuccess, DaffAuthLoginFailure, DaffAuthLogoutSuccess, DaffAuthLogoutFailure, DaffAuthStorageFailure, DaffAuthComplete, DaffAuthServerSide, DaffAuthRevoke } from '../actions/public_api';
6
+ import { DaffAuthLoginSuccess, DaffAuthLoginFailure, DaffAuthLogoutSuccess, DaffAuthLogoutFailure, DaffAuthStorageFailure, DaffAuthServerSide, DaffAuthLoginActions } from '../actions/public_api';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare class DaffAuthLoginEffects<T extends DaffLoginInfo = DaffLoginInfo, U extends DaffAuthToken = DaffAuthToken> {
9
9
  private actions$;
10
10
  private loginDriver;
11
11
  private errorMatcher;
12
12
  private storage;
13
- constructor(actions$: Actions, loginDriver: DaffLoginServiceInterface<T, U>, errorMatcher: ErrorTransformer, storage: DaffAuthStorageService);
13
+ constructor(actions$: Actions<DaffAuthLoginActions<T, U>>, loginDriver: DaffLoginServiceInterface<T, U>, errorMatcher: ErrorTransformer, storage: DaffAuthStorageService);
14
14
  login$: Observable<DaffAuthLoginFailure | DaffAuthLoginSuccess<U>> & import("@ngrx/effects").CreateEffectMetadata;
15
15
  logout$: Observable<DaffAuthLogoutSuccess | DaffAuthLogoutFailure> & import("@ngrx/effects").CreateEffectMetadata;
16
- removeAuthToken$: Observable<DaffAuthStorageFailure | DaffAuthServerSide | DaffAuthRevoke> & import("@ngrx/effects").CreateEffectMetadata;
17
- storeAuthToken$: Observable<DaffAuthStorageFailure | DaffAuthServerSide | DaffAuthComplete> & import("@ngrx/effects").CreateEffectMetadata;
16
+ removeAuthToken$: Observable<DaffAuthStorageFailure | DaffAuthServerSide> & import("@ngrx/effects").CreateEffectMetadata;
17
+ storeAuthToken$: Observable<DaffAuthStorageFailure | DaffAuthServerSide> & import("@ngrx/effects").CreateEffectMetadata;
18
18
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthLoginEffects<any, any>, never>;
19
19
  static ɵprov: i0.ɵɵInjectableDeclaration<DaffAuthLoginEffects<any, any>>;
20
20
  }
@@ -3,13 +3,14 @@ import { Observable } from 'rxjs';
3
3
  import { DaffAccountRegistration, DaffAuthStorageService } from '@daffodil/auth';
4
4
  import { DaffRegisterServiceInterface } from '@daffodil/auth/driver';
5
5
  import { ErrorTransformer } from '@daffodil/core/state';
6
+ import { DaffAuthRegisterActions } from '../actions/public_api';
6
7
  import * as i0 from "@angular/core";
7
8
  export declare class DaffAuthRegisterEffects<T extends DaffAccountRegistration = DaffAccountRegistration> {
8
9
  private actions$;
9
10
  private registerDriver;
10
11
  private errorMatcher;
11
12
  private storage;
12
- constructor(actions$: Actions, registerDriver: DaffRegisterServiceInterface<T>, errorMatcher: ErrorTransformer, storage: DaffAuthStorageService);
13
+ constructor(actions$: Actions<DaffAuthRegisterActions<T>>, registerDriver: DaffRegisterServiceInterface<T>, errorMatcher: ErrorTransformer, storage: DaffAuthStorageService);
13
14
  register$: Observable<any>;
14
15
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthRegisterEffects<any>, never>;
15
16
  static ɵprov: i0.ɵɵInjectableDeclaration<DaffAuthRegisterEffects<any>>;
@@ -3,7 +3,7 @@ import { Observable } from 'rxjs';
3
3
  import { DaffAuthResetPasswordInfo, DaffAuthStorageService } from '@daffodil/auth';
4
4
  import { DaffResetPasswordServiceInterface } from '@daffodil/auth/driver';
5
5
  import { ErrorTransformer } from '@daffodil/core/state';
6
- import { DaffResetPasswordSuccess, DaffResetPasswordFailure, DaffAuthComplete, DaffAuthServerSide, DaffAuthStorageFailure } from '../actions/public_api';
6
+ import { DaffResetPasswordSuccess, DaffResetPasswordFailure, DaffAuthServerSide, DaffAuthStorageFailure } from '../actions/public_api';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare class DaffAuthResetPasswordEffects<T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo> {
9
9
  private actions$;
@@ -12,7 +12,7 @@ export declare class DaffAuthResetPasswordEffects<T extends DaffAuthResetPasswor
12
12
  private storage;
13
13
  constructor(actions$: Actions, driver: DaffResetPasswordServiceInterface<T>, errorMatcher: ErrorTransformer, storage: DaffAuthStorageService);
14
14
  sendResetEmail$: Observable<any>;
15
- resetPassword$: Observable<DaffAuthStorageFailure | DaffAuthServerSide | DaffAuthComplete | DaffResetPasswordSuccess | DaffResetPasswordFailure> & import("@ngrx/effects").CreateEffectMetadata;
15
+ resetPassword$: Observable<DaffAuthStorageFailure | DaffAuthServerSide | DaffResetPasswordSuccess | DaffResetPasswordFailure> & import("@ngrx/effects").CreateEffectMetadata;
16
16
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthResetPasswordEffects<any>, never>;
17
17
  static ɵprov: i0.ɵɵInjectableDeclaration<DaffAuthResetPasswordEffects<any>>;
18
18
  }
@@ -1,3 +1,3 @@
1
- import { DaffAuthActions } from '../../actions/public_api';
1
+ import { DaffAuthActions, DaffAuthLoginActions, DaffAuthRegisterSuccess, DaffAuthResetPasswordActions } from '../../actions/public_api';
2
2
  import { DaffAuthReducerState } from './auth-reducer-state.interface';
3
- export declare function daffAuthReducer(state: DaffAuthReducerState, action: DaffAuthActions): DaffAuthReducerState;
3
+ export declare function daffAuthReducer(state: DaffAuthReducerState, action: DaffAuthActions | DaffAuthLoginActions | DaffAuthRegisterSuccess | DaffAuthResetPasswordActions): DaffAuthReducerState;