/**
 * NeuroLink Authentication Module
 *
 * Exports the full multi-provider authentication system including:
 * - Anthropic OAuth 2.0 flow (PKCE, token storage, callback server)
 * - Multi-provider auth (Auth0, Clerk, Firebase, Supabase, Cognito,
 *   Keycloak, Better Auth, WorkOS, JWT, OAuth2, Custom)
 * - AuthProviderFactory / AuthProviderRegistry for lazy-loaded provider creation
 * - Auth middleware (token extraction, RBAC, rate limiting)
 * - Session management (memory, Redis)
 * - Auth context (AsyncLocalStorage-based request scoping)
 */
export { ANTHROPIC_OAUTH_BASE_URL, DEFAULT_SCOPES, DEFAULT_REDIRECT_URI, DEFAULT_CALLBACK_PORT, } from "./anthropicOAuth.js";
export { AnthropicOAuth } from "./anthropicOAuth.js";
export { OAuthError, OAuthConfigurationError, OAuthTokenExchangeError, OAuthTokenRefreshError, OAuthTokenValidationError, OAuthTokenRevocationError, OAuthCallbackServerError, } from "../types/errors.js";
export { createAnthropicOAuth, createAnthropicOAuthConfig, hasAnthropicOAuthCredentials, startCallbackServer, stopCallbackServer, performOAuthFlow, } from "./anthropicOAuth.js";
export type { OAuthTokenResponse, OAuthFlowTokens, OAuthFlowTokens as OAuthTokens, TokenValidationResult as OAuthTokenValidationResult, AnthropicOAuthConfig, PKCEParams, CallbackResult, } from "../types/index.js";
export { TokenStore, tokenStore, defaultTokenStore } from "./tokenStore.js";
export { TokenStoreError } from "../types/errors.js";
export type { StoredOAuthTokens, TokenRefresher } from "../types/authTypes.js";
export type { NeuroLinkAuthOptions, AuthStatus } from "../types/index.js";
export { AccountPool } from "./accountPool.js";
export type { ProxyAccount, AccountPoolConfig } from "../types/index.js";
export { AuthProviderFactory, createAuthProvider, } from "./AuthProviderFactory.js";
export { AuthProviderRegistry } from "./AuthProviderRegistry.js";
export { AuthError, AuthErrorCodes } from "./errors.js";
export { AuthProviderError, BaseAuthProvider, InMemorySessionStorage, } from "./providers/BaseAuthProvider.js";
export { AuthMiddlewareError, AuthMiddlewareErrorCodes, createAuthMiddleware, createExpressAuthMiddleware, createProtectedMiddleware, createRBACMiddleware, createRequestContext, type ExpressMiddleware, extractToken, type MiddlewareHandler, type MiddlewareResult, type NextFunction, } from "./middleware/AuthMiddleware.js";
export { createAuthenticatedRateLimitMiddleware, createRateLimitByUserMiddleware, createRateLimitStorage, MemoryRateLimitStorage, type RateLimitConfig, type RateLimitMiddlewareResult, type RateLimitResult, type RateLimitStorage, RedisRateLimitStorage, UserRateLimiter, } from "./middleware/rateLimitByUser.js";
export { createSessionStorage, MemorySessionStorage, RedisSessionStorage, SessionManager, type SessionManagerStorage as SessionStorageInterface, } from "./sessionManager.js";
export { AuthContextHolder, createAuthenticatedContext, getAuthContext, getCurrentSession, getCurrentUser, globalAuthContext, hasAllPermissions, hasAnyRole, hasPermission, hasRole, isAuthenticated, requireAuth, requirePermission, requireRole, requireUser, runWithAuthContext, } from "./authContext.js";
export { RequestContext, NEUROLINK_RESOURCE_ID_KEY, NEUROLINK_THREAD_ID_KEY, } from "./RequestContext.js";
export type { Auth0Config, AuthCacheConfig, AuthErrorInfo as AuthErrorType, AuthErrorCode, AuthEventData, AuthEventHandler, AuthEventType, AuthenticatedContext, AuthMiddlewareConfig, AuthorizationResult, AuthProviderConfig, AuthProviderFactoryFn, AuthProviderHealthCheck, AuthProviderRegistration, AuthProviderType, AuthRequestContext, AuthSession, AuthUser, BaseAuthProviderConfig, BetterAuthConfig, ClerkConfig, CognitoConfig, CustomAuthConfig, FirebaseConfig, JWK, JWKS, JWTConfig, KeycloakConfig, MastraAuthProvider, OAuth2Config, RBACConfig, RBACMiddlewareConfig, SessionConfig, SessionStorage, SessionValidationResult, SupabaseConfig, TokenClaims, TokenExtractionConfig, TokenValidationConfig, TokenValidationResult as AuthTokenValidationResult, WorkOSConfig, } from "../types/authTypes.js";
export { createAuthValidatorFromProvider } from "./serverBridge.js";
