oidc-spa 6.8.3 → 6.8.4

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/mock/react.d.ts CHANGED
@@ -43,7 +43,7 @@ export declare function createMockReactOidc<DecodedIdToken extends Record<string
43
43
  } ? true : false : never : never) extends infer T_4 ? T_4 extends (ParamsOfCreateMockOidc<DecodedIdToken, AutoLogin> extends infer T_3 ? T_3 extends ParamsOfCreateMockOidc<DecodedIdToken, AutoLogin> ? T_3 extends {
44
44
  autoLogin?: true | undefined;
45
45
  } ? true : false : never : never) ? T_4 extends true ? {} : {
46
- withLoginRequired: <Props extends Record<string, unknown>>(Component: import("react").ComponentType<Props>, params?: {
46
+ withLoginEnforced: <Props extends Record<string, unknown>>(Component: import("react").ComponentType<Props>, params?: {
47
47
  onRedirecting: () => import("react").JSX.Element | null;
48
48
  }) => import("react").FC<Props>;
49
49
  } : never : never);
@@ -123,7 +123,7 @@ var EphemeralSessionStorage_1 = require("../tools/EphemeralSessionStorage");
123
123
  var ongoingLoginOrRefreshProcesses_1 = require("./ongoingLoginOrRefreshProcesses");
124
124
  (0, handleOidcCallback_1.handleOidcCallback)();
125
125
  // NOTE: Replaced at build time
126
- var VERSION = "6.8.3";
126
+ var VERSION = "6.8.4";
127
127
  var GLOBAL_CONTEXT_KEY = "__oidc-spa.createOidc.globalContext";
128
128
  (_a = window[GLOBAL_CONTEXT_KEY]) !== null && _a !== void 0 ? _a : (window[GLOBAL_CONTEXT_KEY] = {
129
129
  prOidcByConfigId: new Map(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oidc-spa",
3
- "version": "6.8.3",
3
+ "version": "6.8.4",
4
4
  "description": "Openidconnect client for Single Page Applications",
5
5
  "repository": {
6
6
  "type": "git",
package/react/react.d.ts CHANGED
@@ -78,7 +78,7 @@ type OidcReactApi<DecodedIdToken extends Record<string, unknown>, AutoLogin exte
78
78
  };
79
79
  getOidc: () => Promise<AutoLogin extends true ? Oidc.LoggedIn<DecodedIdToken> : Oidc<DecodedIdToken>>;
80
80
  } & (AutoLogin extends true ? {} : {
81
- withLoginRequired: <Props extends Record<string, unknown>>(Component: ComponentType<Props>, params?: {
81
+ withLoginEnforced: <Props extends Record<string, unknown>>(Component: ComponentType<Props>, params?: {
82
82
  onRedirecting: () => JSX.Element | null;
83
83
  }) => FC<Props>;
84
84
  });
package/react/react.js CHANGED
@@ -241,7 +241,7 @@ function createOidcReactApi_dependencyInjection(paramsOrGetParams, createOidc) {
241
241
  }, logout: oidc.logout, renewTokens: oidc.renewTokens, subscribeToAutoLogoutCountdown: oidc.subscribeToAutoLogoutCountdown, goToAuthServer: oidc.goToAuthServer, isNewBrowserSession: oidc.isNewBrowserSession, backFromAuthServer: oidc.backFromAuthServer });
242
242
  return oidcReact;
243
243
  }
244
- function withLoginRequired(Component, params) {
244
+ function withLoginEnforced(Component, params) {
245
245
  var onRedirecting = (params !== null && params !== void 0 ? params : {}).onRedirecting;
246
246
  function ComponentWithAuthenticationRequired(props) {
247
247
  var contextValue = (0, react_1.useContext)(oidcContext);
@@ -292,7 +292,7 @@ function createOidcReactApi_dependencyInjection(paramsOrGetParams, createOidc) {
292
292
  // @ts-expect-error: We know what we are doing
293
293
  useOidc: useOidc,
294
294
  getOidc: getOidc,
295
- withLoginRequired: withLoginRequired
295
+ withLoginEnforced: withLoginEnforced
296
296
  };
297
297
  // @ts-expect-error: We know what we are doing
298
298
  return oidcReact;
@@ -106,7 +106,7 @@ type OidcReactApi<DecodedIdToken extends Record<string, unknown>, AutoLogin exte
106
106
  } & (AutoLogin extends true
107
107
  ? {}
108
108
  : {
109
- withLoginRequired: <Props extends Record<string, unknown>>(
109
+ withLoginEnforced: <Props extends Record<string, unknown>>(
110
110
  Component: ComponentType<Props>,
111
111
  params?: {
112
112
  onRedirecting: () => JSX.Element | null;
@@ -348,7 +348,7 @@ export function createOidcReactApi_dependencyInjection<
348
348
  return oidcReact;
349
349
  }
350
350
 
351
- function withLoginRequired<Props extends Record<string, unknown>>(
351
+ function withLoginEnforced<Props extends Record<string, unknown>>(
352
352
  Component: ComponentType<Props>,
353
353
  params?: {
354
354
  onRedirecting?: () => JSX.Element | null;
@@ -409,7 +409,7 @@ export function createOidcReactApi_dependencyInjection<
409
409
  // @ts-expect-error: We know what we are doing
410
410
  useOidc,
411
411
  getOidc,
412
- withLoginRequired
412
+ withLoginEnforced
413
413
  };
414
414
 
415
415
  // @ts-expect-error: We know what we are doing