@tstdl/base 0.90.39 → 0.90.41

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.
@@ -18,6 +18,8 @@ export declare class AuthenticationClientService<AdditionalTokenPayload extends
18
18
  readonly isLoggedIn: import("../../signals/api.js").Signal<boolean>;
19
19
  readonly subject: import("../../signals/api.js").Signal<string | undefined>;
20
20
  readonly sessionId: import("../../signals/api.js").Signal<string | undefined>;
21
+ readonly impersonator: import("../../signals/api.js").Signal<string | undefined>;
22
+ readonly impersonated: import("../../signals/api.js").Signal<boolean>;
21
23
  readonly token$: import("rxjs").Observable<TokenPayload<AdditionalTokenPayload> | undefined>;
22
24
  readonly definedToken$: import("rxjs").Observable<Exclude<TokenPayload<AdditionalTokenPayload>, void | undefined>>;
23
25
  readonly validToken$: import("rxjs").Observable<Exclude<TokenPayload<AdditionalTokenPayload>, void | undefined>>;
@@ -48,6 +48,8 @@ let AuthenticationClientService = class AuthenticationClientService {
48
48
  isLoggedIn = computed(() => isDefined(this.token()));
49
49
  subject = computed(() => this.token()?.subject);
50
50
  sessionId = computed(() => this.token()?.sessionId);
51
+ impersonator = computed(() => this.token()?.impersonator);
52
+ impersonated = computed(() => isDefined(this.impersonator()));
51
53
  token$ = toObservable(this.token);
52
54
  definedToken$ = this.token$.pipe(filter(isDefined));
53
55
  validToken$ = this.definedToken$.pipe(filter((token) => token.exp > currentTimestampSeconds()));
@@ -102,7 +102,7 @@ let AuthenticationApiController = class AuthenticationApiController {
102
102
  }
103
103
  };
104
104
  if (isDefined(impersonatorRefreshToken)) {
105
- options.cookies['impersonatorRefreshToken'] = { value: `Bearer ${refreshToken}`, ...cookieBaseOptions, expires: assertDefinedPass(impersonatorRefreshTokenExpiration) * 1000 };
105
+ options.cookies['impersonatorRefreshToken'] = { value: `Bearer ${impersonatorRefreshToken}`, ...cookieBaseOptions, expires: assertDefinedPass(impersonatorRefreshTokenExpiration) * 1000 };
106
106
  }
107
107
  if (omitImpersonatorRefreshToken == true) {
108
108
  options.cookies['impersonatorRefreshToken'] = deleteCookie;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tstdl/base",
3
- "version": "0.90.39",
3
+ "version": "0.90.41",
4
4
  "author": "Patrick Hein",
5
5
  "publishConfig": {
6
6
  "access": "public"