@getcronit/pylon
Version:

11 lines (10 loc) • 413 B
TypeScript
import { MiddlewareHandler } from 'hono';
import { Env } from '../../context';
export type AuthRequireChecks = {
roles?: string[];
};
export declare const authMiddleware: (checks?: AuthRequireChecks) => MiddlewareHandler<Env>;
export declare function requireAuth(checks?: AuthRequireChecks): {
<T extends (...args: any[]) => any>(target: Object, propertyKey: string | symbol): void;
<T>(fn: T): T;
};