UNPKG

@gftdcojp/gftd-orm

Version:

Enterprise-grade real-time data platform with ksqlDB, inspired by Supabase architecture

91 lines 3.56 kB
/** * Next.js専用 Auth0 SDK - 最小限のstubバージョン * * ⚠️ 注意: 完全な実装は構文エラーが解決され次第、次のバージョンで提供予定 */ import { NextRequest, NextResponse } from 'next/server'; import { UserPayload } from './types'; /** * Next.js Auth0 設定 */ export interface NextJsAuth0Config { domain: string; clientId: string; clientSecret: string; appBaseUrl: string; secret: string; scope?: string; audience?: string; signInReturnToPath?: string; logoutStrategy?: 'auto' | 'oidc' | 'v2'; session?: { absoluteLifetime?: number; rollingDuration?: number; rolling?: boolean; cookie?: { domain?: string; path?: string; secure?: boolean; sameSite?: 'strict' | 'lax' | 'none'; transient?: boolean; }; }; routes?: { login?: string; logout?: string; callback?: string; profile?: string; accessToken?: string; backchannelLogout?: string; }; organization?: string; } /** * セッションオブジェクト */ export interface Session { user: UserPayload; idToken: string; accessToken: string; refreshToken?: string; expiresAt: number; createdAt: number; } /** * 最小限のクライアント実装 * @todo [P1] Complete Auth0 integration implementation * Assigned: Lead Developer | Milestone: Sprint 1-2 | Impact: Core functionality */ export declare class NextJsAuth0Client { constructor(config?: Partial<NextJsAuth0Config>); getSession(request?: NextRequest): Promise<Session | null>; middleware(request: NextRequest): Promise<NextResponse>; handleAuth(request: NextRequest, endpoint?: string): Promise<NextResponse>; handleAuthLogin(request: NextRequest): Promise<NextResponse>; handleAuthLogout(request: NextRequest): Promise<NextResponse>; handleAuthCallback(request: NextRequest): Promise<NextResponse>; handleAuthMe(request: NextRequest): Promise<NextResponse>; handleAuthAccessToken(request: NextRequest): Promise<NextResponse>; } /** * クライアント作成関数 */ export declare function createNextJsAuth0Client(config?: Partial<NextJsAuth0Config>): NextJsAuth0Client; /** * デフォルトクライアント取得関数 */ export declare function getNextJsAuth0Client(): NextJsAuth0Client; export declare function getSession(req?: any, res?: any): Promise<Session | null>; export declare function getAccessToken(req?: any, res?: any): Promise<{ accessToken: string; } | null>; export declare function updateSession(req?: any, res?: any, user?: any): Promise<Session | null>; export declare function auth0Middleware(request: NextRequest): Promise<NextResponse>; export declare function handleAuth(request: NextRequest, endpoint?: string): Promise<NextResponse>; export declare function handleAuthLogin(request: NextRequest): Promise<NextResponse>; export declare function handleAuthLogout(request: NextRequest): Promise<NextResponse>; export declare function handleAuthCallback(request: NextRequest): Promise<NextResponse>; export declare function handleAuthMe(request: NextRequest): Promise<NextResponse>; export declare function handleAuthAccessToken(request: NextRequest): Promise<NextResponse>; export declare function withMiddlewareAuthRequired(middleware?: (request: NextRequest) => Promise<NextResponse> | NextResponse): (request: NextRequest) => Promise<NextResponse>; //# sourceMappingURL=nextjs-auth0.d.ts.map