import type { RequestHandler } from 'express'; /** * This checks that a user has provided credentials, they may not be fully authorized, ie they may still need to pass 2fa * Note: This is specifically *user* credentials, device keys/application provisioning keys do not count */ export declare const partiallyAuthenticatedUser: RequestHandler; /** * This checks that a user has provided authorized credentials, ie they have passed any required 2fa checks * Note: This is specifically *user* credentials, device keys/application provisioning keys do not count */ export declare const fullyAuthenticatedUser: RequestHandler; /** * This resolves any provided credentials (api key or JWT), with no checks on the actor or 2fa status, * it will also resolve the user the credentials belong to if they are user credentials */ export declare const resolveCredentialsAndUser: RequestHandler; /** * This starts a prefetch of api key permissions without waiting for them to finish resolving */ export declare const prefetchApiKey: RequestHandler; /** * This resolves api key permissions, making use of the prefetch if it exists or otherwise starting a fetch from scratch * Note: this won't reply with 401 if there's no api key */ export declare const resolveApiKey: RequestHandler; /** * This ensures that a valid api key has been passed, returning 401 if it has not */ export declare const authenticatedApiKey: RequestHandler; /** * This ensures that valid credentials have been passed, returning 401 if they have not */ export declare const authenticated: RequestHandler; /** * This creates a middleware that checks a specific permission is present on the request * * @param permission The required permission * @returns The middleware to check the permission */ export declare const permissionRequired: (permission: string) => RequestHandler; /** * This checks that a user has authenticated recently and therefore can perform privileged operations * Note: This is specifically *user* credentials, device keys/application provisioning keys do not count */ export declare const sudo: RequestHandler;