@passflow/core 0.35.2 → 0.35.3
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/README.md +23 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.mjs +1030 -992
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2598,6 +2598,8 @@ type AxiosUpgradeHandler = (error: AxiosError, challenge: UpgradeChallenge) => P
|
|
|
2598
2598
|
* `allowStale` is true when the access token is inside the 30 s window but not yet expired: during
|
|
2599
2599
|
* a pending retry the controller then resolves at once and the call goes out with the current
|
|
2600
2600
|
* bearer instead of waiting for the retry.
|
|
2601
|
+
*
|
|
2602
|
+
* In cookie and BFF mode the same handler runs after a 401 instead, with `allowStale` false.
|
|
2601
2603
|
*/
|
|
2602
2604
|
type AxiosRefreshHandler = (request: {
|
|
2603
2605
|
trigger: 'pre-request';
|
|
@@ -2678,6 +2680,13 @@ declare class AxiosClient {
|
|
|
2678
2680
|
*/
|
|
2679
2681
|
replay<T = unknown>(config: AxiosRequestConfig): Promise<AxiosResponse<T>>;
|
|
2680
2682
|
private isProtectedEndpoint;
|
|
2683
|
+
/**
|
|
2684
|
+
* After a 401 in cookie or BFF mode: one refresh through the handler, at most once per request.
|
|
2685
|
+
* True when the session was refreshed and the request is to be sent again. False for a request
|
|
2686
|
+
* that does not carry the session, a second 401 of the same request, a failed refresh and an
|
|
2687
|
+
* ended session: the 401 then stands.
|
|
2688
|
+
*/
|
|
2689
|
+
private refreshedAfterUnauthorized;
|
|
2681
2690
|
private isNonAuthEndpoint;
|
|
2682
2691
|
/**
|
|
2683
2692
|
* Detect if cookies are supported/enabled in the browser.
|
|
@@ -4064,6 +4073,8 @@ interface RefreshController {
|
|
|
4064
4073
|
signOutNow(cleanup: (newest?: string) => void): void;
|
|
4065
4074
|
/** A new session in this tab (sign-in, register, setTokens): new generation, counters reset. */
|
|
4066
4075
|
sessionStarted(): void;
|
|
4076
|
+
/** Counts the sessions of this tab: an answer asked for under an earlier number is not applied. */
|
|
4077
|
+
readonly generation: number;
|
|
4067
4078
|
/** The `sub` this tab's session belongs to. */
|
|
4068
4079
|
identity(): string | undefined;
|
|
4069
4080
|
readonly coordinated: boolean;
|
|
@@ -4238,6 +4249,8 @@ export declare class AuthService {
|
|
|
4238
4249
|
* its answer through here too. `replace` marks a new session: see `StorageManager.saveTokens()`.
|
|
4239
4250
|
*/
|
|
4240
4251
|
private applyAuthResponse;
|
|
4252
|
+
/** Whether the answer's ID or access token names audiences that leave out the current app id. */
|
|
4253
|
+
private issuedForAnotherApp;
|
|
4241
4254
|
/** A registration that leaves the user signed in: `Register`, then `SignIn` with the same payload. */
|
|
4242
4255
|
private notifyRegisteredAndSignedIn;
|
|
4243
4256
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -2598,6 +2598,8 @@ type AxiosUpgradeHandler = (error: AxiosError, challenge: UpgradeChallenge) => P
|
|
|
2598
2598
|
* `allowStale` is true when the access token is inside the 30 s window but not yet expired: during
|
|
2599
2599
|
* a pending retry the controller then resolves at once and the call goes out with the current
|
|
2600
2600
|
* bearer instead of waiting for the retry.
|
|
2601
|
+
*
|
|
2602
|
+
* In cookie and BFF mode the same handler runs after a 401 instead, with `allowStale` false.
|
|
2601
2603
|
*/
|
|
2602
2604
|
type AxiosRefreshHandler = (request: {
|
|
2603
2605
|
trigger: 'pre-request';
|
|
@@ -2678,6 +2680,13 @@ declare class AxiosClient {
|
|
|
2678
2680
|
*/
|
|
2679
2681
|
replay<T = unknown>(config: AxiosRequestConfig): Promise<AxiosResponse<T>>;
|
|
2680
2682
|
private isProtectedEndpoint;
|
|
2683
|
+
/**
|
|
2684
|
+
* After a 401 in cookie or BFF mode: one refresh through the handler, at most once per request.
|
|
2685
|
+
* True when the session was refreshed and the request is to be sent again. False for a request
|
|
2686
|
+
* that does not carry the session, a second 401 of the same request, a failed refresh and an
|
|
2687
|
+
* ended session: the 401 then stands.
|
|
2688
|
+
*/
|
|
2689
|
+
private refreshedAfterUnauthorized;
|
|
2681
2690
|
private isNonAuthEndpoint;
|
|
2682
2691
|
/**
|
|
2683
2692
|
* Detect if cookies are supported/enabled in the browser.
|
|
@@ -4064,6 +4073,8 @@ interface RefreshController {
|
|
|
4064
4073
|
signOutNow(cleanup: (newest?: string) => void): void;
|
|
4065
4074
|
/** A new session in this tab (sign-in, register, setTokens): new generation, counters reset. */
|
|
4066
4075
|
sessionStarted(): void;
|
|
4076
|
+
/** Counts the sessions of this tab: an answer asked for under an earlier number is not applied. */
|
|
4077
|
+
readonly generation: number;
|
|
4067
4078
|
/** The `sub` this tab's session belongs to. */
|
|
4068
4079
|
identity(): string | undefined;
|
|
4069
4080
|
readonly coordinated: boolean;
|
|
@@ -4238,6 +4249,8 @@ export declare class AuthService {
|
|
|
4238
4249
|
* its answer through here too. `replace` marks a new session: see `StorageManager.saveTokens()`.
|
|
4239
4250
|
*/
|
|
4240
4251
|
private applyAuthResponse;
|
|
4252
|
+
/** Whether the answer's ID or access token names audiences that leave out the current app id. */
|
|
4253
|
+
private issuedForAnotherApp;
|
|
4241
4254
|
/** A registration that leaves the user signed in: `Register`, then `SignIn` with the same payload. */
|
|
4242
4255
|
private notifyRegisteredAndSignedIn;
|
|
4243
4256
|
/**
|