@smartbit4all/ng-client 6.0.7 → 6.0.9
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/esm2022/lib/session/smart-error-catching.interceptor.mjs +3 -3
- package/esm2022/lib/session/smart-session.service.mjs +48 -23
- package/esm2022/lib/smart-component-layout/smart-component-layout.component.mjs +2 -2
- package/fesm2022/smartbit4all-ng-client.mjs +279 -255
- package/fesm2022/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/session/smart-error-catching.interceptor.d.ts +2 -1
- package/lib/session/smart-session.service.d.ts +18 -1
- package/package.json +1 -1
- package/smartbit4all-ng-client-6.0.9.tgz +0 -0
- package/smartbit4all-ng-client-6.0.7.tgz +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { SessionError
|
|
3
|
+
import { SessionError } from './smart-session-handler.service';
|
|
4
|
+
import { SmartSessionService } from './smart-session.service';
|
|
4
5
|
import { SmartBackendBootstrapService } from './smart-backend-bootstrap.service';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class SmartErrorCatchingInterceptor implements HttpInterceptor {
|
|
@@ -58,8 +58,25 @@ export declare class SmartSessionService implements OnDestroy {
|
|
|
58
58
|
getSession(): Promise<SessionInfoData>;
|
|
59
59
|
refreshSession(): Promise<SessionInfoData>;
|
|
60
60
|
private doRefreshSession;
|
|
61
|
+
/**
|
|
62
|
+
* Runs the standard session-restart handling for a refresh that finished
|
|
63
|
+
* without an error HTTP response (no refresh token, or an empty refresh
|
|
64
|
+
* result), then throws a failure shaped like the backend's rejected refresh.
|
|
65
|
+
*
|
|
66
|
+
* Only the paths that do NOT produce an error HTTP response come here: a
|
|
67
|
+
* refresh call that fails with a session error is already handled by the
|
|
68
|
+
* SmartErrorCatchingInterceptor, so routing it through here too would invoke
|
|
69
|
+
* handleSessionError a second time.
|
|
70
|
+
*/
|
|
71
|
+
private failRefresh;
|
|
72
|
+
/**
|
|
73
|
+
* Builds a failure shaped exactly like the backend's rejected-refresh
|
|
74
|
+
* response (HTTP 400 + ApiError.code === 'session.refreshtoken.invalid'), so a
|
|
75
|
+
* failed/impossible refresh surfaces like any other invalid refresh token
|
|
76
|
+
* instead of producing a fresh session as a refresh side effect.
|
|
77
|
+
*/
|
|
78
|
+
private createRefreshFailedError;
|
|
61
79
|
private updateSessionInfo;
|
|
62
|
-
private isInvalidRefreshTokenError;
|
|
63
80
|
getAuthenticationProviders(): Promise<Array<AuthenticationProviderData>>;
|
|
64
81
|
getIsAuthenticated(): Promise<boolean>;
|
|
65
82
|
is2FANecessary(): Promise<boolean>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartbit4all/ng-client",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.9",
|
|
4
4
|
"description": "Angular client library for the smartbit4all platform — a server-driven UI framework that renders views, pages, forms, grids, trees and dialogs from backend (ViewApi/PageApi) definitions. Provides reactive view-context state management, dynamic component layouts and OpenAPI-generated BFF clients.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/animations": "^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0",
|
|
Binary file
|
|
Binary file
|