@monocloud/auth-nextjs 0.1.7 → 0.1.8

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/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as ProtectedRouteMatcher, C as ProtectAppPageOptions, D as ProtectPagePageOptions, E as ProtectPagePageOnGroupAccessDeniedType, M as RedirectToSignInOptions, N as RedirectToSignOutOptions, O as ProtectPagePageReturnType, S as ProtectApiPageOptions, T as ProtectPagePageOnAccessDeniedType, _ as OnError, a as AppRouterContext, b as PageRouterApiOnGroupAccessDeniedHandler, c as ExtraAuthParams, d as MonoCloudAuthHandler, f as MonoCloudAuthOptions, g as NextMiddlewareResult, h as NextMiddlewareOnGroupAccessDenied, i as AppRouterApiOnGroupAccessDeniedHandler, j as ProtectedRoutes, k as ProtectedAppServerComponent, l as GroupOptions, m as NextMiddlewareOnAccessDenied, n as AppRouterApiHandlerFn, o as AppRouterPageHandler, p as MonoCloudMiddlewareOptions, r as AppRouterApiOnAccessDeniedHandler, s as CustomProtectedRouteMatcher, t as AppOnError, u as IsUserInGroupOptions, v as PageOnError, w as ProtectOptions, x as ProtectApiAppOptions, y as PageRouterApiOnAccessDeniedHandler } from "./types-xS_Me3Qg.mjs";
1
+ import { A as ProtectedAppServerComponent, C as ProtectAppPageOptions, D as ProtectPagePageOnGroupAccessDeniedType, E as ProtectPagePageOnAccessDeniedType, F as RedirectToSignOutOptions, M as ProtectedRouteMatcher, N as ProtectedRoutes, O as ProtectPagePageOptions, P as RedirectToSignInOptions, S as ProtectApiPageOptions, T as ProtectPageGetServerSidePropsContext, _ as OnError, a as AppRouterContext, b as PageRouterApiOnGroupAccessDeniedHandler, c as ExtraAuthParams, d as MonoCloudAuthHandler, f as MonoCloudAuthOptions, g as NextMiddlewareResult, h as NextMiddlewareOnGroupAccessDenied, i as AppRouterApiOnGroupAccessDeniedHandler, j as ProtectedAppServerComponentProps, k as ProtectPagePageReturnType, l as GroupOptions, m as NextMiddlewareOnAccessDenied, n as AppRouterApiHandlerFn, o as AppRouterPageHandler, p as MonoCloudMiddlewareOptions, r as AppRouterApiOnAccessDeniedHandler, s as CustomProtectedRouteMatcher, t as AppOnError, u as IsUserInGroupOptions, v as PageOnError, w as ProtectOptions, x as ProtectApiAppOptions, y as PageRouterApiOnAccessDeniedHandler } from "./types-ClljFIvK.mjs";
2
2
  import { AccessToken, Address, ApplicationState, Authenticators, AuthorizationParams, CodeChallengeMethod, DisplayOptions, GetTokensOptions, GetTokensOptions as GetTokensOptions$1, Group, IdTokenClaims, Indicator, Jwk, MonoCloudAuthBaseError, MonoCloudCookieOptions, MonoCloudCoreClient, MonoCloudHttpError, MonoCloudOPError, MonoCloudOptions, MonoCloudOptions as MonoCloudOptions$1, MonoCloudRequest, MonoCloudRoutes, MonoCloudSession, MonoCloudSession as MonoCloudSession$1, MonoCloudSessionOptions, MonoCloudSessionOptionsBase, MonoCloudSessionStore, MonoCloudStateOptions, MonoCloudStatePartialOptions, MonoCloudTokenError, MonoCloudTokens, MonoCloudTokens as MonoCloudTokens$1, MonoCloudUser, MonoCloudValidationError, OnBackChannelLogout, OnSessionCreating, OnSetApplicationState, Prompt, ResponseModes, ResponseTypes, SameSiteValues, SecurityAlgorithms, SessionLifetime, UserinfoResponse } from "@monocloud/auth-node-core";
3
3
  import { NextFetchEvent, NextMiddleware, NextProxy, NextRequest, NextResponse } from "next/server.js";
4
4
  import { NextFetchEvent as NextFetchEvent$1, NextMiddleware as NextMiddleware$1, NextProxy as NextProxy$1, NextRequest as NextRequest$1, NextResponse as NextResponse$1 } from "next/server";
@@ -154,7 +154,7 @@ declare class MonoCloudNextClient {
154
154
  /**
155
155
  * @see {@link protectPage} for full docs and examples.
156
156
  * @param options Optional configuration for authentication, authorization, and custom access handling (`onAccessDenied`, `onGroupAccessDenied`).
157
- * @typeParam P - Props returned from getServerSideProps.
157
+ * @typeParam P - Props returned from `getServerSideProps`.
158
158
  * @typeParam Q - Query parameters parsed from the URL.
159
159
  * @returns A getServerSideProps wrapper that enforces authentication before executing the page logic.
160
160
  */
@@ -462,7 +462,7 @@ declare function monoCloudAuth(options?: MonoCloudAuthOptions): MonoCloudAuthHan
462
462
  * ```
463
463
  *
464
464
  * @param options Optional configuration that controls how authentication is enforced (for example, redirect behavior, route matching, or custom handling of unauthenticated requests).
465
- * @returns Returns a Next.js middleware result, such as a NextResponse, redirect, or undefined to continue processing.
465
+ * @returns Returns a Next.js middleware result, such as a `NextResponse`, `redirect`, or `undefined` to continue processing.
466
466
  *
467
467
  * @category Functions
468
468
  */
@@ -1311,7 +1311,7 @@ declare function protectPage(component: ProtectedAppServerComponent, options?: P
1311
1311
  * ```
1312
1312
  *
1313
1313
  * @param options Optional configuration for authentication, authorization, and custom access handling (`onAccessDenied`, `onGroupAccessDenied`).
1314
- * @typeParam P - Props returned from getServerSideProps.
1314
+ * @typeParam P - Props returned from `getServerSideProps`.
1315
1315
  * @typeParam Q - Query parameters parsed from the URL.
1316
1316
  * @returns A getServerSideProps wrapper that enforces authentication before executing the page logic.
1317
1317
  *
@@ -1677,5 +1677,5 @@ declare function redirectToSignIn(options?: RedirectToSignInOptions): Promise<vo
1677
1677
  */
1678
1678
  declare function redirectToSignOut(options?: RedirectToSignOutOptions): Promise<void>;
1679
1679
  //#endregion
1680
- export { type AccessToken, type Address, type AppOnError, type AppRouterApiHandlerFn, type AppRouterApiOnAccessDeniedHandler, type AppRouterApiOnGroupAccessDeniedHandler, type AppRouterContext, type AppRouterPageHandler, type ApplicationState, type Authenticators, type AuthorizationParams, type CodeChallengeMethod, type CustomProtectedRouteMatcher, type DisplayOptions, type ExtraAuthParams, type GetTokensOptions, type Group, type GroupOptions, type IdTokenClaims, type Indicator, type IsUserInGroupOptions, type Jwk, MonoCloudAuthBaseError, type MonoCloudAuthHandler, type MonoCloudAuthOptions, type MonoCloudCookieOptions, MonoCloudHttpError, type MonoCloudMiddlewareOptions, MonoCloudNextClient, MonoCloudOPError, type MonoCloudOptions, type MonoCloudRequest, type MonoCloudRoutes, type MonoCloudSession, type MonoCloudSessionOptions, type MonoCloudSessionOptionsBase, type MonoCloudSessionStore, type MonoCloudStateOptions, type MonoCloudStatePartialOptions, MonoCloudTokenError, type MonoCloudTokens, type MonoCloudUser, MonoCloudValidationError, type NextMiddlewareOnAccessDenied, type NextMiddlewareOnGroupAccessDenied, type NextMiddlewareResult, type OnBackChannelLogout, type OnError, type OnSessionCreating, type OnSetApplicationState, type PageOnError, type PageRouterApiOnAccessDeniedHandler, type PageRouterApiOnGroupAccessDeniedHandler, type Prompt, type ProtectApiAppOptions, type ProtectApiPageOptions, type ProtectAppPageOptions, type ProtectOptions, type ProtectPagePageOnAccessDeniedType, type ProtectPagePageOnGroupAccessDeniedType, type ProtectPagePageOptions, type ProtectPagePageReturnType, type ProtectedAppServerComponent, type ProtectedRouteMatcher, type ProtectedRoutes, type RedirectToSignInOptions, type RedirectToSignOutOptions, type ResponseModes, type ResponseTypes, type SameSiteValues, type SecurityAlgorithms, type SessionLifetime, type UserinfoResponse, authMiddleware, getSession, getTokens, isAuthenticated, isUserInGroup, monoCloudAuth, protect, protectApi, protectPage, redirectToSignIn, redirectToSignOut };
1680
+ export { type AccessToken, type Address, type AppOnError, type AppRouterApiHandlerFn, type AppRouterApiOnAccessDeniedHandler, type AppRouterApiOnGroupAccessDeniedHandler, type AppRouterContext, type AppRouterPageHandler, type ApplicationState, type Authenticators, type AuthorizationParams, type CodeChallengeMethod, type CustomProtectedRouteMatcher, type DisplayOptions, type ExtraAuthParams, type GetTokensOptions, type Group, type GroupOptions, type IdTokenClaims, type Indicator, type IsUserInGroupOptions, type Jwk, MonoCloudAuthBaseError, type MonoCloudAuthHandler, type MonoCloudAuthOptions, type MonoCloudCookieOptions, MonoCloudHttpError, type MonoCloudMiddlewareOptions, MonoCloudNextClient, MonoCloudOPError, type MonoCloudOptions, type MonoCloudRequest, type MonoCloudRoutes, type MonoCloudSession, type MonoCloudSessionOptions, type MonoCloudSessionOptionsBase, type MonoCloudSessionStore, type MonoCloudStateOptions, type MonoCloudStatePartialOptions, MonoCloudTokenError, type MonoCloudTokens, type MonoCloudUser, MonoCloudValidationError, type NextMiddlewareOnAccessDenied, type NextMiddlewareOnGroupAccessDenied, type NextMiddlewareResult, type OnBackChannelLogout, type OnError, type OnSessionCreating, type OnSetApplicationState, type PageOnError, type PageRouterApiOnAccessDeniedHandler, type PageRouterApiOnGroupAccessDeniedHandler, type Prompt, type ProtectApiAppOptions, type ProtectApiPageOptions, type ProtectAppPageOptions, type ProtectOptions, type ProtectPageGetServerSidePropsContext, type ProtectPagePageOnAccessDeniedType, type ProtectPagePageOnGroupAccessDeniedType, type ProtectPagePageOptions, type ProtectPagePageReturnType, type ProtectedAppServerComponent, type ProtectedAppServerComponentProps, type ProtectedRouteMatcher, type ProtectedRoutes, type RedirectToSignInOptions, type RedirectToSignOutOptions, type ResponseModes, type ResponseTypes, type SameSiteValues, type SecurityAlgorithms, type SessionLifetime, type UserinfoResponse, authMiddleware, getSession, getTokens, isAuthenticated, isUserInGroup, monoCloudAuth, protect, protectApi, protectPage, redirectToSignIn, redirectToSignOut };
1681
1681
  //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs CHANGED
@@ -417,7 +417,7 @@ var MonoCloudNextClient = class {
417
417
  constructor(options) {
418
418
  const opt = {
419
419
  ...options ?? {},
420
- userAgent: (options === null || options === void 0 ? void 0 : options.userAgent) ?? `@monocloud/auth-nextjs@0.1.7`,
420
+ userAgent: (options === null || options === void 0 ? void 0 : options.userAgent) ?? `@monocloud/auth-nextjs@0.1.8`,
421
421
  debugger: (options === null || options === void 0 ? void 0 : options.debugger) ?? "@monocloud:auth-nextjs"
422
422
  };
423
423
  this.registerPublicEnvVariables();
@@ -810,8 +810,8 @@ var MonoCloudNextClient = class {
810
810
  if (options === null || options === void 0 ? void 0 : options.returnUrl) signInRoute.searchParams.set("return_url", options.returnUrl);
811
811
  if (options === null || options === void 0 ? void 0 : options.maxAge) signInRoute.searchParams.set("max_age", options.maxAge.toString());
812
812
  if (options === null || options === void 0 ? void 0 : options.authenticatorHint) signInRoute.searchParams.set("authenticator_hint", options.authenticatorHint);
813
- if (Array.isArray(options === null || options === void 0 ? void 0 : options.scopes)) signInRoute.searchParams.set("scope", options.scopes.join(" "));
814
- if (Array.isArray(options === null || options === void 0 ? void 0 : options.resource)) signInRoute.searchParams.set("resource", options.resource.join(" "));
813
+ if (options === null || options === void 0 ? void 0 : options.scopes) signInRoute.searchParams.set("scope", options.scopes);
814
+ if (options === null || options === void 0 ? void 0 : options.resource) signInRoute.searchParams.set("resource", options.resource);
815
815
  if (options === null || options === void 0 ? void 0 : options.display) signInRoute.searchParams.set("display", options.display);
816
816
  if (options === null || options === void 0 ? void 0 : options.uiLocales) signInRoute.searchParams.set("ui_locales", options.uiLocales);
817
817
  if (Array.isArray(options === null || options === void 0 ? void 0 : options.acrValues)) signInRoute.searchParams.set("acr_values", options.acrValues.join(" "));