@gftdcojp/auth
Version:
✅ Enterprise-grade Auth0 integration for GFTD platform - 90% Complete, High Quality Implementation
93 lines • 3.89 kB
TypeScript
/**
* Next.js Auth0 SDK - Universal Entry Point
*
* 🔄 Client & Server 安全実装
* - 自動的にサーバー・クライアント判定
* - Next.js環境適応
* - 型安全性確保
*
* 使用場所:
* - Client Components (型のみ)
* - Server Components (実装付き)
* - API Routes (実装付き)
* - Middleware (実装付き)
*/
import type { NextJsAuth0Config, Session, OrganizationLoginOptions } from './nextjs-auth0-types';
import type { UserPayload } from './types';
export type { NextJsAuth0Config, Session, OrganizationLoginOptions, } from './nextjs-auth0-types';
/**
* 条件的エクスポート関数群
*
* サーバーサイドでのみ実装を読み込み、
* クライアントサイドでは型安全なエラーを投げる
*/
/**
* Next.js Auth0 クライアント(条件的)
*/
export declare class NextJsAuth0Client {
constructor(config?: Partial<NextJsAuth0Config>);
}
/**
* Next.js Auth0 Client作成(条件的)
*/
export declare function createNextJsAuth0Client(config?: Partial<NextJsAuth0Config>): Promise<import("./nextjs-auth0-server").NextJsAuth0Client>;
/**
* セッション取得(条件的)
*/
export declare function getSession(request?: any): Promise<Session | null>;
/**
* 🆕 組織コンテキストでのセッション取得(条件的)
*/
export declare function getSessionWithOrganization(organizationId?: string, request?: any): Promise<Session | null>;
/**
* アクセストークン取得(条件的)
*/
export declare function getAccessToken(request?: any): Promise<{
accessToken: string;
} | null>;
/**
* セッション更新(条件的)
*/
export declare function updateSession(updates: Partial<UserPayload>, request?: any): Promise<Session | null>;
/**
* ミドルウェア認証必須ラッパー(条件的)
*/
export declare function withMiddlewareAuthRequired(middleware?: any): Promise<(request: import("next/server").NextRequest) => Promise<import("next/server").NextResponse>>;
/**
* 🆕 組織認証必須ミドルウェアラッパー(条件的)
*/
export declare function withOrganizationAuthRequired(organizationId?: string, middleware?: any): Promise<(request: import("next/server").NextRequest) => Promise<import("next/server").NextResponse>>;
/**
* ミドルウェア(条件的)
*/
export declare function auth0Middleware(request: any): Promise<import("next/server").NextResponse<unknown>>;
/**
* API認証必須ラッパー(条件的)
*/
export declare function withApiAuthRequired<T = any>(handler: any): Promise<(request: import("next/server").NextRequest) => Promise<any>>;
/**
* 🆕 組織API認証必須ラッパー(条件的)
*/
export declare function withOrganizationApiAuthRequired<T = any>(organizationId?: string, handler?: any): Promise<(request: import("next/server").NextRequest) => Promise<any>>;
/**
* 統合Auth Handler(条件的)
*/
export declare function handleAuth(request: any, route?: string): Promise<Response>;
/**
* 個別Route Handler関数(条件的)
*/
export declare function handleAuthLogin(request: any): Promise<Response>;
export declare function handleAuthLogout(request: any): Promise<Response>;
export declare function handleAuthCallback(request: any): Promise<Response>;
export declare function handleAuthMe(request: any): Promise<Response>;
/**
* 🆕 組織関連Route Handler関数(条件的)
*/
export declare function handleOrganizationLogin(request: any): Promise<Response>;
export declare function handleOrganizationCallback(request: any): Promise<Response>;
export declare function handleOrganizationSelection(request: any): Promise<Response>;
/**
* 🆕 組織ログインURL生成ヘルパー(条件的)
*/
export declare function buildOrganizationLoginUrl(options: OrganizationLoginOptions): Promise<string>;
//# sourceMappingURL=nextjs-auth0.d.ts.map