UNPKG

ssr-keycloak

Version:

SSR compatible Keycloak authentication library for React applications

15 lines (14 loc) 823 B
import { NextRequest, NextResponse } from 'next/server'; import { KeycloakConfig, KeycloakMiddlewareConfig } from '../types'; /** * Next.js middleware için Keycloak entegrasyonu */ export declare function createKeycloakMiddleware(config: KeycloakConfig, middlewareConfig?: KeycloakMiddlewareConfig): (request: NextRequest) => Promise<NextResponse<unknown>>; /** * Next.js API route handler'ları için Keycloak entegrasyonu */ export declare function createKeycloakAPIHandler(config: KeycloakConfig, handler: (request: any, response: any, context: any) => Promise<any>): (request: NextRequest) => Promise<any>; /** * Server-side props için Keycloak entegrasyonu */ export declare function withKeycloakSSR(config: KeycloakConfig, getServerSideProps?: (context: any) => Promise<any>): (context: any) => Promise<any>;