oidc-spa 8.6.14 → 8.6.15
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/core/createOidc.js +1 -1
- package/esm/angular.d.ts +4 -4
- package/esm/backend.d.ts +1 -1
- package/esm/core/Oidc.d.ts +1 -1
- package/esm/core/OidcMetadata.d.ts +1 -1
- package/esm/core/createOidc.d.ts +2 -2
- package/esm/core/createOidc.mjs +1 -1
- package/esm/core/diagnostic.d.ts +1 -1
- package/esm/core/earlyInit.d.ts +3 -3
- package/esm/core/evtIsUserActive.d.ts +1 -1
- package/esm/core/index.d.ts +3 -3
- package/esm/core/instancesThatCantUseIframes.d.ts +1 -1
- package/esm/core/isNewBrowserSession.d.ts +1 -1
- package/esm/core/loginOrGoToAuthServer.d.ts +2 -2
- package/esm/core/loginSilent.d.ts +2 -2
- package/esm/core/oidcClientTsUserToTokens.d.ts +2 -2
- package/esm/entrypoint.d.ts +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/keycloak/index.d.ts +3 -3
- package/esm/keycloak/keycloak-js/Keycloak.d.ts +2 -2
- package/esm/keycloak/keycloak-js/index.d.ts +2 -2
- package/esm/keycloak/keycloakUtils.d.ts +1 -1
- package/esm/keycloak-js.d.ts +1 -1
- package/esm/mock/index.d.ts +1 -1
- package/esm/mock/oidc.d.ts +1 -1
- package/esm/mock/react.d.ts +8 -8
- package/esm/react/index.d.ts +1 -1
- package/esm/react/react.d.ts +2 -2
- package/esm/react-spa/apiBuilder.d.ts +3 -3
- package/esm/react-spa/createOidcSpaApi.d.ts +3 -3
- package/esm/react-spa/index.d.ts +2 -2
- package/esm/react-spa/types.d.ts +2 -2
- package/esm/tanstack-start/react/accessTokenValidation_rfc9068.d.ts +3 -3
- package/esm/tanstack-start/react/apiBuilder.d.ts +4 -4
- package/esm/tanstack-start/react/createOidcSpaApi.d.ts +3 -3
- package/esm/tanstack-start/react/index.d.ts +4 -4
- package/esm/tanstack-start/react/types.d.ts +4 -4
- package/esm/tools/tsafe/Equals.d.ts +2 -2
- package/esm/tools/tsafe/Param0.d.ts +2 -5
- package/esm/tools/tsafe/assert.d.ts +1 -1
- package/esm/vite-plugin/handleClientEntrypoint.d.ts +2 -2
- package/esm/vite-plugin/handleServerEntrypoint.d.ts +1 -1
- package/esm/vite-plugin/index.d.ts +1 -1
- package/esm/vite-plugin/manageOptimizedDeps.d.ts +1 -1
- package/esm/vite-plugin/vite-plugin.d.ts +1 -1
- package/package.json +1 -1
package/core/createOidc.js
CHANGED
|
@@ -73,7 +73,7 @@ const ensureNonBlankPaint_1 = require("../tools/ensureNonBlankPaint");
|
|
|
73
73
|
const StateDataCookie_1 = require("./StateDataCookie");
|
|
74
74
|
const tokenPlaceholderSubstitution_1 = require("./tokenPlaceholderSubstitution");
|
|
75
75
|
// NOTE: Replaced at build time
|
|
76
|
-
const VERSION = "8.6.
|
|
76
|
+
const VERSION = "8.6.15";
|
|
77
77
|
const globalContext = {
|
|
78
78
|
prOidcByConfigId: new Map(),
|
|
79
79
|
hasLogoutBeenCalled: (0, id_1.id)(false)
|
package/esm/angular.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Subject } from "rxjs";
|
|
2
|
-
import type { Oidc, OidcInitializationError } from "./core
|
|
3
|
-
import type { OidcMetadata } from "./core/OidcMetadata
|
|
2
|
+
import type { Oidc, OidcInitializationError } from "./core";
|
|
3
|
+
import type { OidcMetadata } from "./core/OidcMetadata";
|
|
4
4
|
import { type Signal, type EnvironmentProviders } from "@angular/core";
|
|
5
5
|
import type { HttpInterceptorFn, HttpRequest } from "@angular/common/http";
|
|
6
|
-
import type { ReadonlyBehaviorSubject } from "./tools/ReadonlyBehaviorSubject
|
|
7
|
-
import type { ValueOrAsyncGetter } from "./tools/ValueOrAsyncGetter
|
|
6
|
+
import type { ReadonlyBehaviorSubject } from "./tools/ReadonlyBehaviorSubject";
|
|
7
|
+
import type { ValueOrAsyncGetter } from "./tools/ValueOrAsyncGetter";
|
|
8
8
|
export type ParamsOfProvide = {
|
|
9
9
|
issuerUri: string;
|
|
10
10
|
clientId: string;
|
package/esm/backend.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ZodSchemaLike } from "./tools/ZodSchemaLike
|
|
1
|
+
import type { ZodSchemaLike } from "./tools/ZodSchemaLike";
|
|
2
2
|
/**
|
|
3
3
|
* Claims defined by RFC 9068: "JSON Web Token (JWT) Profile for OAuth 2.0 Access Tokens"
|
|
4
4
|
* https://datatracker.ietf.org/doc/html/rfc9068
|
package/esm/core/Oidc.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OidcInitializationError } from "./OidcInitializationError
|
|
1
|
+
import type { OidcInitializationError } from "./OidcInitializationError";
|
|
2
2
|
export declare type Oidc<DecodedIdToken extends Record<string, unknown> = Oidc.Tokens.DecodedIdToken_OidcCoreSpec> = Oidc.LoggedIn<DecodedIdToken> | Oidc.NotLoggedIn;
|
|
3
3
|
export declare namespace Oidc {
|
|
4
4
|
type Common = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type OidcMetadata as OidcClientTsOidcMetadata } from "../vendor/frontend/oidc-client-ts
|
|
1
|
+
import { type OidcMetadata as OidcClientTsOidcMetadata } from "../vendor/frontend/oidc-client-ts";
|
|
2
2
|
/**
|
|
3
3
|
* OpenID Providers have metadata describing their configuration.
|
|
4
4
|
*
|
package/esm/core/createOidc.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type OidcMetadata } from "./OidcMetadata
|
|
2
|
-
import type { Oidc } from "./Oidc
|
|
1
|
+
import { type OidcMetadata } from "./OidcMetadata";
|
|
2
|
+
import type { Oidc } from "./Oidc";
|
|
3
3
|
export type ParamsOfCreateOidc<DecodedIdToken extends Record<string, unknown> = Oidc.Tokens.DecodedIdToken_OidcCoreSpec, AutoLogin extends boolean = false> = {
|
|
4
4
|
/**
|
|
5
5
|
* See: https://docs.oidc-spa.dev/v/v8/providers-configuration/provider-configuration
|
package/esm/core/createOidc.mjs
CHANGED
|
@@ -36,7 +36,7 @@ import { ensureNonBlankPaint } from "../tools/ensureNonBlankPaint.mjs";
|
|
|
36
36
|
import { setStateDataCookieIfEnabled, clearStateDataCookie, getIsStateDataCookieEnabled } from "./StateDataCookie.mjs";
|
|
37
37
|
import { getIsTokenSubstitutionEnabled } from "./tokenPlaceholderSubstitution.mjs";
|
|
38
38
|
// NOTE: Replaced at build time
|
|
39
|
-
const VERSION = "8.6.
|
|
39
|
+
const VERSION = "8.6.15";
|
|
40
40
|
const globalContext = {
|
|
41
41
|
prOidcByConfigId: new Map(),
|
|
42
42
|
hasLogoutBeenCalled: id(false)
|
package/esm/core/diagnostic.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OidcInitializationError } from "./OidcInitializationError
|
|
1
|
+
import { OidcInitializationError } from "./OidcInitializationError";
|
|
2
2
|
export declare function createWellKnownOidcConfigurationEndpointUnreachableInitializationError(params: {
|
|
3
3
|
issuerUri: string;
|
|
4
4
|
}): Promise<OidcInitializationError>;
|
package/esm/core/earlyInit.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { AuthResponse } from "./AuthResponse
|
|
2
|
-
import { type Evt } from "../tools/Evt
|
|
3
|
-
import { type Params as Params_handleTokenExfiltrationDefense_legacy } from "./tokenExfiltrationDefense_legacy
|
|
1
|
+
import type { AuthResponse } from "./AuthResponse";
|
|
2
|
+
import { type Evt } from "../tools/Evt";
|
|
3
|
+
import { type Params as Params_handleTokenExfiltrationDefense_legacy } from "./tokenExfiltrationDefense_legacy";
|
|
4
4
|
export type ParamsOfEarlyInit_legacy = Params_handleTokenExfiltrationDefense_legacy & {
|
|
5
5
|
BASE_URL?: string;
|
|
6
6
|
};
|
package/esm/core/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { Oidc } from "./Oidc
|
|
2
|
-
export { createOidc, type ParamsOfCreateOidc } from "./createOidc
|
|
3
|
-
export { OidcInitializationError } from "./OidcInitializationError
|
|
1
|
+
export type { Oidc } from "./Oidc";
|
|
2
|
+
export { createOidc, type ParamsOfCreateOidc } from "./createOidc";
|
|
3
|
+
export { OidcInitializationError } from "./OidcInitializationError";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const evtIsThereMoreThanOneInstanceThatCantUserIframes: import("../tools/StatefulEvt
|
|
1
|
+
export declare const evtIsThereMoreThanOneInstanceThatCantUserIframes: import("../tools/StatefulEvt").StatefulEvt<boolean>;
|
|
2
2
|
export declare function notifyNewInstanceThatCantUseIframes(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { UserManager as OidcClientTsUserManager } from "../vendor/frontend/oidc-client-ts
|
|
2
|
-
import type { NonPostableEvt } from "../tools/Evt
|
|
1
|
+
import type { UserManager as OidcClientTsUserManager } from "../vendor/frontend/oidc-client-ts";
|
|
2
|
+
import type { NonPostableEvt } from "../tools/Evt";
|
|
3
3
|
type Params = Params.Login | Params.GoToAuthServer;
|
|
4
4
|
declare namespace Params {
|
|
5
5
|
type Common = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { UserManager as OidcClientTsUserManager, User as OidcClientTsUser } from "../vendor/frontend/oidc-client-ts
|
|
2
|
-
import { type AuthResponse } from "./AuthResponse
|
|
1
|
+
import type { UserManager as OidcClientTsUserManager, User as OidcClientTsUser } from "../vendor/frontend/oidc-client-ts";
|
|
2
|
+
import { type AuthResponse } from "./AuthResponse";
|
|
3
3
|
type ResultOfLoginSilent = {
|
|
4
4
|
outcome: "got auth response from iframe";
|
|
5
5
|
authResponse: AuthResponse;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { User as OidcClientTsUser } from "../vendor/frontend/oidc-client-ts
|
|
2
|
-
import type { Oidc } from "./Oidc
|
|
1
|
+
import type { User as OidcClientTsUser } from "../vendor/frontend/oidc-client-ts";
|
|
2
|
+
import type { Oidc } from "./Oidc";
|
|
3
3
|
export declare function oidcClientTsUserToTokens<DecodedIdToken extends Record<string, unknown>>(params: {
|
|
4
4
|
configId: string;
|
|
5
5
|
oidcClientTsUser: OidcClientTsUser;
|
package/esm/entrypoint.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { oidcEarlyInit } from "./core/earlyInit
|
|
1
|
+
export { oidcEarlyInit } from "./core/earlyInit";
|
package/esm/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { type Oidc, OidcInitializationError, type ParamsOfCreateOidc, createOidc } from "./core
|
|
1
|
+
export { type Oidc, OidcInitializationError, type ParamsOfCreateOidc, createOidc } from "./core";
|
package/esm/keycloak/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { isKeycloak } from "./isKeycloak
|
|
2
|
-
export type { KeycloakIssuerUriParsed } from "./keycloakIssuerUriParsed
|
|
3
|
-
export { type KeycloakUtils, KeycloakProfile, KeycloakUserInfo, createKeycloakUtils } from "./keycloakUtils
|
|
1
|
+
export { isKeycloak } from "./isKeycloak";
|
|
2
|
+
export type { KeycloakIssuerUriParsed } from "./keycloakIssuerUriParsed";
|
|
3
|
+
export { type KeycloakUtils, KeycloakProfile, KeycloakUserInfo, createKeycloakUtils } from "./keycloakUtils";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { KeycloakServerConfig, KeycloakInitOptions, KeycloakError, KeycloakLogoutOptions, KeycloakRoles, KeycloakTokenParsed, KeycloakResourceAccess, KeycloakProfile, KeycloakUserInfo, KeycloakLoginOptions, KeycloakRegisterOptions, KeycloakAccountOptions } from "./types
|
|
2
|
-
import { type Oidc } from "../../core
|
|
1
|
+
import type { KeycloakServerConfig, KeycloakInitOptions, KeycloakError, KeycloakLogoutOptions, KeycloakRoles, KeycloakTokenParsed, KeycloakResourceAccess, KeycloakProfile, KeycloakUserInfo, KeycloakLoginOptions, KeycloakRegisterOptions, KeycloakAccountOptions } from "./types";
|
|
2
|
+
import { type Oidc } from "../../core";
|
|
3
3
|
type ConstructorParams = KeycloakServerConfig & {
|
|
4
4
|
/**
|
|
5
5
|
* NOTE: This parameter is optional if you use the Vite plugin.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type * from "./types
|
|
2
|
-
export { Keycloak } from "./Keycloak
|
|
1
|
+
export type * from "./types";
|
|
2
|
+
export { Keycloak } from "./Keycloak";
|
package/esm/keycloak-js.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./keycloak/keycloak-js
|
|
1
|
+
export * from "./keycloak/keycloak-js";
|
package/esm/mock/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./oidc
|
|
1
|
+
export * from "./oidc";
|
package/esm/mock/oidc.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Oidc } from "../core
|
|
1
|
+
import type { Oidc } from "../core";
|
|
2
2
|
export type ParamsOfCreateMockOidc<DecodedIdToken extends Record<string, unknown> = Record<string, unknown>, AutoLogin extends boolean = false> = {
|
|
3
3
|
mockedParams?: Partial<Oidc["params"]>;
|
|
4
4
|
mockedTokens?: Partial<Oidc.Tokens<DecodedIdToken>>;
|
package/esm/mock/react.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ParamsOfCreateMockOidc } from "./oidc
|
|
2
|
-
import type { ValueOrAsyncGetter } from "../tools/ValueOrAsyncGetter
|
|
1
|
+
import { type ParamsOfCreateMockOidc } from "./oidc";
|
|
2
|
+
import type { ValueOrAsyncGetter } from "../tools/ValueOrAsyncGetter";
|
|
3
3
|
/** @see: https://docs.oidc-spa.dev/v/v8/mock */
|
|
4
4
|
export declare function createMockReactOidc<DecodedIdToken extends Record<string, unknown> = Record<string, unknown>, AutoLogin extends boolean = false>(params: ValueOrAsyncGetter<ParamsOfCreateMockOidc<DecodedIdToken, AutoLogin>>): {
|
|
5
5
|
OidcProvider: (ParamsOfCreateMockOidc<DecodedIdToken, AutoLogin> extends infer T ? T extends ParamsOfCreateMockOidc<DecodedIdToken, AutoLogin> ? T extends {
|
|
@@ -9,7 +9,7 @@ export declare function createMockReactOidc<DecodedIdToken extends Record<string
|
|
|
9
9
|
} ? true : false : never : never) ? T_1 extends true ? (props: {
|
|
10
10
|
fallback?: import("react").ReactNode;
|
|
11
11
|
ErrorFallback?: (props: {
|
|
12
|
-
initializationError: import("
|
|
12
|
+
initializationError: import("..").OidcInitializationError;
|
|
13
13
|
}) => import("react").ReactNode;
|
|
14
14
|
children: import("react").ReactNode;
|
|
15
15
|
}) => import("react").JSX.Element : (props: {
|
|
@@ -22,22 +22,22 @@ export declare function createMockReactOidc<DecodedIdToken extends Record<string
|
|
|
22
22
|
autoLogin?: true | undefined;
|
|
23
23
|
} ? true : false : never : never) ? T_4 extends true ? (params?: {
|
|
24
24
|
assert: "user logged in";
|
|
25
|
-
}) => import("../react/react
|
|
25
|
+
}) => import("../react/react").OidcReact.LoggedIn<DecodedIdToken> : {
|
|
26
26
|
(params?: {
|
|
27
27
|
assert?: undefined;
|
|
28
|
-
}): import("../react/react
|
|
28
|
+
}): import("../react/react").OidcReact<DecodedIdToken>;
|
|
29
29
|
(params: {
|
|
30
30
|
assert: "user logged in";
|
|
31
|
-
}): import("../react/react
|
|
31
|
+
}): import("../react/react").OidcReact.LoggedIn<DecodedIdToken>;
|
|
32
32
|
(params: {
|
|
33
33
|
assert: "user not logged in";
|
|
34
|
-
}): import("../react/react
|
|
34
|
+
}): import("../react/react").OidcReact.NotLoggedIn;
|
|
35
35
|
} : never : never;
|
|
36
36
|
getOidc: () => Promise<(ParamsOfCreateMockOidc<DecodedIdToken, AutoLogin> extends infer T_6 ? T_6 extends ParamsOfCreateMockOidc<DecodedIdToken, AutoLogin> ? T_6 extends {
|
|
37
37
|
autoLogin?: true | undefined;
|
|
38
38
|
} ? true : false : never : never) extends infer T_7 ? T_7 extends (ParamsOfCreateMockOidc<DecodedIdToken, AutoLogin> extends infer T_8 ? T_8 extends ParamsOfCreateMockOidc<DecodedIdToken, AutoLogin> ? T_8 extends {
|
|
39
39
|
autoLogin?: true | undefined;
|
|
40
|
-
} ? true : false : never : never) ? T_7 extends true ? import("
|
|
40
|
+
} ? true : false : never : never) ? T_7 extends true ? import("..").Oidc.LoggedIn<DecodedIdToken> : import("..").Oidc<DecodedIdToken> : never : never>;
|
|
41
41
|
} & ((ParamsOfCreateMockOidc<DecodedIdToken, AutoLogin> extends infer T_6 ? T_6 extends ParamsOfCreateMockOidc<DecodedIdToken, AutoLogin> ? T_6 extends {
|
|
42
42
|
autoLogin?: true | undefined;
|
|
43
43
|
} ? true : false : never : never) extends infer T_7 ? T_7 extends (ParamsOfCreateMockOidc<DecodedIdToken, AutoLogin> extends infer T_8 ? T_8 extends ParamsOfCreateMockOidc<DecodedIdToken, AutoLogin> ? T_8 extends {
|
package/esm/react/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { type OidcReact, createReactOidc } from "./react
|
|
1
|
+
export { type OidcReact, createReactOidc } from "./react";
|
package/esm/react/react.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode, type ComponentType, type FC, type JSX } from "react";
|
|
2
|
-
import { type Oidc, type ParamsOfCreateOidc, OidcInitializationError } from "../core
|
|
3
|
-
import type { ValueOrAsyncGetter } from "../tools/ValueOrAsyncGetter
|
|
2
|
+
import { type Oidc, type ParamsOfCreateOidc, OidcInitializationError } from "../core";
|
|
3
|
+
import type { ValueOrAsyncGetter } from "../tools/ValueOrAsyncGetter";
|
|
4
4
|
export type OidcReact<DecodedIdToken extends Record<string, unknown>> = OidcReact.NotLoggedIn | OidcReact.LoggedIn<DecodedIdToken>;
|
|
5
5
|
export declare namespace OidcReact {
|
|
6
6
|
type Common = Oidc.Common & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { OidcSpaApi } from "./types
|
|
2
|
-
import type { Oidc as Oidc_core } from "../core
|
|
3
|
-
import type { ZodSchemaLike } from "../tools/ZodSchemaLike
|
|
1
|
+
import type { OidcSpaApi } from "./types";
|
|
2
|
+
import type { Oidc as Oidc_core } from "../core";
|
|
3
|
+
import type { ZodSchemaLike } from "../tools/ZodSchemaLike";
|
|
4
4
|
export type OidcSpaApiBuilder<AutoLogin extends boolean = false, DecodedIdToken extends Record<string, unknown> = Oidc_core.Tokens.DecodedIdToken_OidcCoreSpec, ExcludedMethod extends "withAutoLogin" | "withExpectedDecodedIdTokenShape" | "withAccessTokenValidation" | "createUtils" = never> = Omit<{
|
|
5
5
|
withAutoLogin: () => OidcSpaApiBuilder<true, DecodedIdToken, ExcludedMethod | "withAutoLogin">;
|
|
6
6
|
withExpectedDecodedIdTokenShape: <DecodedIdToken extends Record<string, unknown>>(params: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { OidcSpaApi } from "./types
|
|
2
|
-
import type { ZodSchemaLike } from "../tools/ZodSchemaLike
|
|
3
|
-
import type { Oidc as Oidc_core } from "../core
|
|
1
|
+
import type { OidcSpaApi } from "./types";
|
|
2
|
+
import type { ZodSchemaLike } from "../tools/ZodSchemaLike";
|
|
3
|
+
import type { Oidc as Oidc_core } from "../core";
|
|
4
4
|
export declare function createOidcSpaApi<AutoLogin extends boolean, DecodedIdToken extends Record<string, unknown>>(params: {
|
|
5
5
|
autoLogin: AutoLogin;
|
|
6
6
|
decodedIdTokenSchema: ZodSchemaLike<Oidc_core.Tokens.DecodedIdToken_OidcCoreSpec, DecodedIdToken> | undefined;
|
package/esm/react-spa/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type * from "./types
|
|
2
|
-
export declare const oidcSpa: import("./apiBuilder
|
|
1
|
+
export type * from "./types";
|
|
2
|
+
export declare const oidcSpa: import("./apiBuilder").OidcSpaApiBuilder<false, Record<string, unknown>, never>;
|
package/esm/react-spa/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode, ComponentType } from "react";
|
|
2
|
-
import type { Oidc as Oidc_core, OidcInitializationError } from "../core
|
|
3
|
-
import type { OidcMetadata } from "../core/OidcMetadata
|
|
2
|
+
import type { Oidc as Oidc_core, OidcInitializationError } from "../core";
|
|
3
|
+
import type { OidcMetadata } from "../core/OidcMetadata";
|
|
4
4
|
export type UseOidc<DecodedIdToken> = {
|
|
5
5
|
(params?: {
|
|
6
6
|
assert?: undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { CreateValidateAndGetAccessTokenClaims, ParamsOfBootstrap } from "./types
|
|
2
|
-
import type { DecodedAccessToken_RFC9068 as AccessTokenClaims_RFC9068 } from "../../backend
|
|
3
|
-
import type { ZodSchemaLike } from "../../tools/ZodSchemaLike
|
|
1
|
+
import type { CreateValidateAndGetAccessTokenClaims, ParamsOfBootstrap } from "./types";
|
|
2
|
+
import type { DecodedAccessToken_RFC9068 as AccessTokenClaims_RFC9068 } from "../../backend";
|
|
3
|
+
import type { ZodSchemaLike } from "../../tools/ZodSchemaLike";
|
|
4
4
|
export declare function createCreateValidateAndGetAccessTokenClaims_rfc9068<AccessTokenClaims extends Record<string, unknown>>(params: {
|
|
5
5
|
accessTokenClaimsSchema?: ZodSchemaLike<AccessTokenClaims_RFC9068, AccessTokenClaims>;
|
|
6
6
|
accessTokenClaims_mock?: AccessTokenClaims;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { OidcSpaApi, CreateValidateAndGetAccessTokenClaims, ParamsOfBootstrap } from "./types
|
|
2
|
-
import type { Oidc as Oidc_core } from "../../core
|
|
3
|
-
import type { ZodSchemaLike } from "../../tools/ZodSchemaLike
|
|
4
|
-
import type { DecodedAccessToken_RFC9068 as AccessTokenClaims_RFC9068 } from "../../backend
|
|
1
|
+
import type { OidcSpaApi, CreateValidateAndGetAccessTokenClaims, ParamsOfBootstrap } from "./types";
|
|
2
|
+
import type { Oidc as Oidc_core } from "../../core";
|
|
3
|
+
import type { ZodSchemaLike } from "../../tools/ZodSchemaLike";
|
|
4
|
+
import type { DecodedAccessToken_RFC9068 as AccessTokenClaims_RFC9068 } from "../../backend";
|
|
5
5
|
export type OidcSpaApiBuilder<AutoLogin extends boolean = false, DecodedIdToken extends Record<string, unknown> = Oidc_core.Tokens.DecodedIdToken_OidcCoreSpec, AccessTokenClaims extends Record<string, unknown> | undefined = undefined, ExcludedMethod extends "withAutoLogin" | "withExpectedDecodedIdTokenShape" | "withAccessTokenValidation" | "createUtils" = never> = Omit<{
|
|
6
6
|
withAutoLogin: () => OidcSpaApiBuilder<true, DecodedIdToken, AccessTokenClaims, ExcludedMethod | "withAutoLogin">;
|
|
7
7
|
withExpectedDecodedIdTokenShape: <DecodedIdToken extends Record<string, unknown>>(params: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { CreateValidateAndGetAccessTokenClaims, OidcSpaApi } from "./types
|
|
2
|
-
import type { ZodSchemaLike } from "../../tools/ZodSchemaLike
|
|
3
|
-
import type { Oidc as Oidc_core } from "../../core
|
|
1
|
+
import type { CreateValidateAndGetAccessTokenClaims, OidcSpaApi } from "./types";
|
|
2
|
+
import type { ZodSchemaLike } from "../../tools/ZodSchemaLike";
|
|
3
|
+
import type { Oidc as Oidc_core } from "../../core";
|
|
4
4
|
export declare function createOidcSpaApi<AutoLogin extends boolean, DecodedIdToken extends Record<string, unknown>, AccessTokenClaims extends Record<string, unknown> | undefined>(params: {
|
|
5
5
|
autoLogin: AutoLogin;
|
|
6
6
|
decodedIdTokenSchema: ZodSchemaLike<Oidc_core.Tokens.DecodedIdToken_OidcCoreSpec, DecodedIdToken> | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { __disableSsrIfLoginEnforced } from "./disableSsrIfLoginEnforced
|
|
2
|
-
export { __withOidcSpaServerEntry } from "./withOidcSpaServerEntry
|
|
3
|
-
export type * from "./types
|
|
4
|
-
export declare const oidcSpa: import("./apiBuilder
|
|
1
|
+
export { __disableSsrIfLoginEnforced } from "./disableSsrIfLoginEnforced";
|
|
2
|
+
export { __withOidcSpaServerEntry } from "./withOidcSpaServerEntry";
|
|
3
|
+
export type * from "./types";
|
|
4
|
+
export declare const oidcSpa: import("./apiBuilder").OidcSpaApiBuilder<false, Record<string, unknown>, undefined, never>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Oidc as Oidc_core, OidcInitializationError } from "../../core
|
|
1
|
+
import type { Oidc as Oidc_core, OidcInitializationError } from "../../core";
|
|
2
2
|
import type { FunctionMiddlewareAfterServer, RequestMiddlewareAfterServer } from "@tanstack/react-start";
|
|
3
|
-
import type { GetterOrDirectValue } from "../../tools/GetterOrDirectValue
|
|
4
|
-
import type { OidcMetadata } from "../../core/OidcMetadata
|
|
5
|
-
import type { MaybeAsync } from "../../tools/MaybeAsync
|
|
3
|
+
import type { GetterOrDirectValue } from "../../tools/GetterOrDirectValue";
|
|
4
|
+
import type { OidcMetadata } from "../../core/OidcMetadata";
|
|
5
|
+
import type { MaybeAsync } from "../../tools/MaybeAsync";
|
|
6
6
|
export type UseOidc<DecodedIdToken> = {
|
|
7
7
|
(params?: {
|
|
8
8
|
assert?: undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Unite } from "./tools/Unite
|
|
2
|
-
import type { StrictEquals } from "./tools/StrictEquals
|
|
1
|
+
import type { Unite } from "./tools/Unite";
|
|
2
|
+
import type { StrictEquals } from "./tools/StrictEquals";
|
|
3
3
|
/** https://docs.tsafe.dev/main/equals */
|
|
4
4
|
export type Equals<A1, A2> = StrictEquals<Unite<A1>, Unite<A2>>;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import type { Parameters } from "./Parameters
|
|
1
|
+
import type { Parameters } from "./Parameters";
|
|
2
2
|
type NonUndefined<T> = T extends undefined ? never : T;
|
|
3
3
|
/** Shorthand for Parameters<typeof f>[0] https://docs.tsafe.dev/param0 */
|
|
4
4
|
export type Param0<T extends ((...args: any[]) => unknown) | null | undefined | false | ""> = [
|
|
5
5
|
Parameters<T>
|
|
6
|
-
] extends [
|
|
7
|
-
never
|
|
8
|
-
] ? never : Parameters<T> extends [
|
|
9
|
-
] ? void : NonUndefined<Parameters<T>[0]>;
|
|
6
|
+
] extends [never] ? never : Parameters<T> extends [] ? void : NonUndefined<Parameters<T>[0]>;
|
|
10
7
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { OidcSpaVitePluginParams } from "./vite-plugin
|
|
1
|
+
import type { OidcSpaVitePluginParams } from "./vite-plugin";
|
|
2
2
|
import type { ResolvedConfig } from "vite";
|
|
3
3
|
import type { PluginContext } from "rollup";
|
|
4
|
-
import type { ProjectType } from "./projectType
|
|
4
|
+
import type { ProjectType } from "./projectType";
|
|
5
5
|
export declare function createHandleClientEntrypoint(params: {
|
|
6
6
|
oidcSpaVitePluginParams: OidcSpaVitePluginParams;
|
|
7
7
|
resolvedConfig: ResolvedConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ResolvedConfig } from "vite";
|
|
2
2
|
import type { PluginContext } from "rollup";
|
|
3
|
-
import type { ProjectType } from "./projectType
|
|
3
|
+
import type { ProjectType } from "./projectType";
|
|
4
4
|
export declare function createHandleServerEntrypoint(params: {
|
|
5
5
|
resolvedConfig: ResolvedConfig;
|
|
6
6
|
projectType: ProjectType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { oidcSpa } from "./vite-plugin
|
|
1
|
+
export { oidcSpa } from "./vite-plugin";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Plugin } from "vite";
|
|
2
|
-
import type { ParamsOfEarlyInit, ParamsOfEarlyInit_legacy } from "../core/earlyInit
|
|
2
|
+
import type { ParamsOfEarlyInit, ParamsOfEarlyInit_legacy } from "../core/earlyInit";
|
|
3
3
|
export type OidcSpaVitePluginParams = Omit<ParamsOfEarlyInit, "BASE_URL"> | Omit<ParamsOfEarlyInit_legacy, "BASE_URL">;
|
|
4
4
|
export declare function oidcSpa(params?: OidcSpaVitePluginParams): Plugin<any>;
|