@daffodil/auth 0.56.1 → 0.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/driver/public_api.d.ts +1 -0
- package/driver/services/auth-check.service.d.ts +17 -0
- package/driver/services/public_api.d.ts +1 -0
- package/errors/codes.enum.d.ts +3 -0
- package/errors/map.d.ts +7 -0
- package/errors/missing-token.d.ts +10 -0
- package/errors/public_api.d.ts +3 -0
- package/esm2020/driver/public_api.mjs +2 -1
- package/esm2020/driver/services/auth-check.service.mjs +38 -0
- package/esm2020/driver/services/public_api.mjs +2 -0
- package/esm2020/errors/codes.enum.mjs +5 -0
- package/esm2020/errors/map.mjs +9 -0
- package/esm2020/errors/missing-token.mjs +14 -0
- package/esm2020/errors/public_api.mjs +4 -0
- package/esm2020/public_api.mjs +2 -1
- package/esm2020/routing/config/default.mjs +2 -1
- package/esm2020/routing/config/interface.mjs +1 -1
- package/esm2020/routing/effects/redirect.effects.mjs +13 -5
- package/esm2020/routing/guards/guest-only.guard.mjs +28 -15
- package/esm2020/routing/guards/member-only.guard.mjs +28 -15
- package/esm2020/state/actions/auth.actions.mjs +11 -40
- package/esm2020/state/actions/reset-password.actions.mjs +3 -2
- package/esm2020/state/effects/auth.effects.mjs +22 -23
- package/esm2020/state/effects/login.effects.mjs +7 -7
- package/esm2020/state/effects/register.effects.mjs +3 -3
- package/esm2020/state/effects/reset-password.effects.mjs +3 -3
- package/esm2020/state/reducers/auth/auth.reducer.mjs +11 -4
- package/fesm2015/daffodil-auth-driver.mjs +40 -2
- package/fesm2015/daffodil-auth-driver.mjs.map +1 -1
- package/fesm2015/daffodil-auth-routing.mjs +63 -31
- package/fesm2015/daffodil-auth-routing.mjs.map +1 -1
- package/fesm2015/daffodil-auth-state.mjs +52 -77
- package/fesm2015/daffodil-auth-state.mjs.map +1 -1
- package/fesm2015/daffodil-auth.mjs +26 -2
- package/fesm2015/daffodil-auth.mjs.map +1 -1
- package/fesm2020/daffodil-auth-driver.mjs +38 -2
- package/fesm2020/daffodil-auth-driver.mjs.map +1 -1
- package/fesm2020/daffodil-auth-routing.mjs +62 -30
- package/fesm2020/daffodil-auth-routing.mjs.map +1 -1
- package/fesm2020/daffodil-auth-state.mjs +55 -77
- package/fesm2020/daffodil-auth-state.mjs.map +1 -1
- package/fesm2020/daffodil-auth.mjs +26 -2
- package/fesm2020/daffodil-auth.mjs.map +1 -1
- package/package.json +3 -3
- package/public_api.d.ts +1 -0
- package/routing/config/interface.d.ts +5 -0
- package/routing/effects/redirect.effects.d.ts +3 -1
- package/routing/guards/guest-only.guard.d.ts +9 -5
- package/routing/guards/member-only.guard.d.ts +9 -5
- package/state/actions/auth.actions.d.ts +8 -34
- package/state/actions/reset-password.actions.d.ts +2 -0
- package/state/effects/auth.effects.d.ts +10 -9
- package/state/effects/login.effects.d.ts +4 -4
- package/state/effects/register.effects.d.ts +2 -1
- package/state/effects/reset-password.effects.d.ts +2 -2
- 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 {
|
|
3
|
+
import { DaffAuthDriverTokenCheck } from '@daffodil/auth/driver';
|
|
5
4
|
import { ErrorTransformer } from '@daffodil/core/state';
|
|
6
|
-
import {
|
|
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
|
|
11
|
+
private tokenCheck;
|
|
12
12
|
private errorMatcher;
|
|
13
13
|
private storage;
|
|
14
14
|
private config;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
removeAuthToken$: Observable<DaffAuthStorageFailure | DaffAuthServerSide
|
|
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,
|
|
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
|
|
17
|
-
storeAuthToken$: Observable<DaffAuthStorageFailure | DaffAuthServerSide
|
|
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
|
|
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,
|
|
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 |
|
|
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;
|