@maxio-com/self-service 1.9.6 → 1.10.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/dist/maxio-components.cjs.js +1 -1
- package/dist/maxio-components.esm.js +1 -1
- package/dist/maxio-components.umd.js +1 -1
- package/package.json +1 -1
- package/typings/packages/session-manager/src/SessionManager/SessionManager.d.ts +6 -3
- package/typings/packages/session-manager/src/SessionManager/types.d.ts +4 -0
package/package.json
CHANGED
|
@@ -5,8 +5,8 @@ declare class SessionManager {
|
|
|
5
5
|
private onAuthenticationRequest;
|
|
6
6
|
private onAuthenticationRequestAsync;
|
|
7
7
|
private token;
|
|
8
|
-
private expDate
|
|
9
|
-
private iatDate
|
|
8
|
+
private expDate?;
|
|
9
|
+
private iatDate?;
|
|
10
10
|
private tokenLifespanInMilliseconds;
|
|
11
11
|
private tokenRefreshIntervalHandle;
|
|
12
12
|
private tokenCheckIntervalHandle;
|
|
@@ -18,11 +18,14 @@ declare class SessionManager {
|
|
|
18
18
|
private managerInitializing;
|
|
19
19
|
private logger;
|
|
20
20
|
private subscriptions;
|
|
21
|
-
|
|
21
|
+
private apiUrl?;
|
|
22
|
+
constructor({ accessTokenUrl, onAuthenticationRequest, onAuthenticationRequestAsync, intervalInMilliseconds, maxRetryNumber, apiUrl, }: SessionManagerParameters);
|
|
22
23
|
initialize(): void;
|
|
23
24
|
private authenticateUser;
|
|
24
25
|
private notifySubscribers;
|
|
25
26
|
checkTokenRefresh(): NodeJS.Timer;
|
|
27
|
+
private handleDecodedToken;
|
|
28
|
+
private getTokenLifespan;
|
|
26
29
|
destroy(): void;
|
|
27
30
|
subscribe(callback: (session: SessionState) => void): () => void;
|
|
28
31
|
get accessToken(): string;
|
|
@@ -4,6 +4,7 @@ export type SessionManagerParameters = {
|
|
|
4
4
|
onAuthenticationRequestAsync?: () => Promise<Record<string, string>>;
|
|
5
5
|
intervalInMilliseconds?: number;
|
|
6
6
|
maxRetryNumber?: number;
|
|
7
|
+
apiUrl?: string;
|
|
7
8
|
};
|
|
8
9
|
export type SessionState = {
|
|
9
10
|
isInitialized: boolean;
|
|
@@ -13,3 +14,6 @@ export type SessionSubscriber = {
|
|
|
13
14
|
id: number;
|
|
14
15
|
callback: (session: SessionState) => void;
|
|
15
16
|
};
|
|
17
|
+
export type SessionExpirationResponse = {
|
|
18
|
+
max_token_expiration_seconds: number;
|
|
19
|
+
};
|