@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
23 lines (22 loc) • 960 B
text/typescript
import { LucidHonoGeneric } from "../../../types/hono.mjs";
//#region src/libs/http/middleware/authenticate.d.ts
type TenantScope = "required" | "allow-global";
/**
* Controls whether a route must be scoped to a tenant.
* Use `allow-global` for routes that need to work before or outside tenant selection.
*/
type AuthenticateOptions = {
tenantScope?: TenantScope;
};
/**
* Verifies the access token and stores the current auth state in Hono context.
* Soft mode is used by optional auth paths where anonymous requests are allowed.
*/
/**
* Authenticates an admin request and, by default, requires a tenant when tenancy is enabled.
* Pass `tenantScope: "allow-global"` for global routes such as account/bootstrap data.
*/
declare const authenticate: (options?: AuthenticateOptions) => import("hono").MiddlewareHandler<LucidHonoGeneric, any, {}, Response>;
//#endregion
export { authenticate as default };
//# sourceMappingURL=authenticate.d.mts.map