@re-auth/http-adapters
Version:
HTTP adapters for ReAuth authentication framework
28 lines • 1.64 kB
TypeScript
import { FastifyInstance } from 'fastify';
import { ReAuthEngine } from '@re-auth/reauth';
import { FastifyAdapterV2 } from './fastify-adapter-v2';
/**
* Basic Fastify adapter usage with V2 factory pattern
*/
export declare function createBasicFastifyAdapter(fastify: FastifyInstance, reAuthEngine: ReAuthEngine): Promise<FastifyAdapterV2>;
/**
* Advanced Fastify adapter with context rules for OAuth
*/
export declare function createOAuthFastifyAdapter(fastify: FastifyInstance, reAuthEngine: ReAuthEngine): Promise<FastifyInstance<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify").FastifyBaseLogger, import("fastify").FastifyTypeProviderDefault>>;
/**
* Multi-tenant Fastify adapter with tenant-specific context
*/
export declare function createMultiTenantFastifyAdapter(fastify: FastifyInstance, reAuthEngine: ReAuthEngine): Promise<FastifyAdapterV2>;
/**
* Production-ready Fastify adapter with comprehensive configuration
*/
export declare function createProductionFastifyAdapter(fastify: FastifyInstance, reAuthEngine: ReAuthEngine): Promise<FastifyAdapterV2>;
/**
* Utility function to create a Fastify plugin for ReAuth
*/
export declare function createReAuthFastifyPlugin(reAuthEngine: ReAuthEngine): Promise<(fastify: FastifyInstance, options: import("fastify").FastifyPluginOptions) => Promise<void>>;
/**
* Complete example showing how to set up a Fastify server with ReAuth
*/
export declare function createCompleteFastifyApp(reAuthEngine: ReAuthEngine): Promise<any>;
//# sourceMappingURL=example-usage-v2.d.ts.map