@trudb/tru-common-lib 0.0.698 → 0.0.700
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/components/login/classes/tru-auth-jwt-strategy.mjs +9 -5
- package/esm2020/lib/components/login/classes/tru-auth-token.mjs +4 -4
- package/esm2020/lib/components/login/services/tru-auth.mjs +6 -4
- package/fesm2015/trudb-tru-common-lib.mjs +13 -7
- package/fesm2015/trudb-tru-common-lib.mjs.map +1 -1
- package/fesm2020/trudb-tru-common-lib.mjs +13 -7
- package/fesm2020/trudb-tru-common-lib.mjs.map +1 -1
- package/lib/components/login/classes/tru-auth-jwt-strategy.d.ts +1 -0
- package/lib/components/login/classes/tru-auth-token.d.ts +3 -3
- package/lib/components/login/services/tru-auth.d.ts +3 -1
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ export declare class TruAuthJwtStrategy implements TruAuthStrategy<TruAuthToken>
|
|
|
9
9
|
doLoginUser(token: TruAuthToken): void;
|
|
10
10
|
doLogoutUser(): void;
|
|
11
11
|
getCurrentUser(): Observable<TruUser | undefined>;
|
|
12
|
+
getUserRoles(): Observable<Array<string> | null>;
|
|
12
13
|
isLoggedIn(): boolean;
|
|
13
14
|
getJwtToken(): any;
|
|
14
15
|
getToken(): any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare class TruAuthToken {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
accessToken: string;
|
|
3
|
+
refreshToken: string;
|
|
4
4
|
userClaims: string;
|
|
5
|
-
constructor(
|
|
5
|
+
constructor(accessToken: string, refreshToken: string, userClaims: string);
|
|
6
6
|
}
|
|
@@ -6,6 +6,7 @@ import { TruAuthCache } from "./tru-auth-cache";
|
|
|
6
6
|
import { TruAuthStrategy } from "../classes/tru-auth-config";
|
|
7
7
|
import { TruUser } from "../../../services/tru-user";
|
|
8
8
|
import { TruAppEnvironment } from "../../../services/tru-app-environment";
|
|
9
|
+
import { JwtHelperService } from '@auth0/angular-jwt';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
export declare class TruAuth {
|
|
11
12
|
private router;
|
|
@@ -13,10 +14,11 @@ export declare class TruAuth {
|
|
|
13
14
|
private cache;
|
|
14
15
|
private user;
|
|
15
16
|
private appEnvironment;
|
|
17
|
+
private jwtHelperService;
|
|
16
18
|
private auth;
|
|
17
19
|
private loggedIn;
|
|
18
20
|
private baseUrl;
|
|
19
|
-
constructor(router: Router, http: HttpClient, cache: TruAuthCache, user: TruUser, appEnvironment: TruAppEnvironment, auth: TruAuthStrategy<any>);
|
|
21
|
+
constructor(router: Router, http: HttpClient, cache: TruAuthCache, user: TruUser, appEnvironment: TruAppEnvironment, jwtHelperService: JwtHelperService, auth: TruAuthStrategy<any>);
|
|
20
22
|
login(loginRequest: TruAuthLoginRequest): Observable<any>;
|
|
21
23
|
logout(): void;
|
|
22
24
|
isLoggedIn$(): Observable<boolean>;
|