"""Authentication module for SSO MCP Server.
Supports dual-mode authentication:
- LOCAL mode: OAuth client flow with browser SSO
- CLOUD mode: Resource Server with Bearer token validation
"""
from sso_mcp_server.auth.browser import BrowserAuth
from sso_mcp_server.auth.cloud import JWKSClient, TokenClaims, TokenValidator
from sso_mcp_server.auth.exceptions import (
AuthError,
AuthNotConfiguredError,
CloudAuthError,
CloudTokenExpiredError,
ConfigurationError,
InsufficientScopeError,
InteractiveAuthFailedError,
InvalidAudienceError,
InvalidIssuerError,
InvalidTokenError,
JWKSFetchError,
MissingAuthorizationError,
NotAuthenticatedError,
SilentAuthFailedError,
TokenExpiredError,
TokenSignatureError,
)
from sso_mcp_server.auth.manager import AuthManager
from sso_mcp_server.auth.middleware import (
check_auth,
ensure_authenticated,
get_current_claims,
require_auth,
set_auth_manager,
set_authorization_header,
set_token_validator,
)
from sso_mcp_server.auth.token_store import TokenStore
__all__ = [
"AuthError",
"AuthManager",
"AuthNotConfiguredError",
"BrowserAuth",
"CloudAuthError",
"CloudTokenExpiredError",
"ConfigurationError",
"InsufficientScopeError",
"InteractiveAuthFailedError",
"InvalidAudienceError",
"InvalidIssuerError",
"InvalidTokenError",
"JWKSClient",
"JWKSFetchError",
"MissingAuthorizationError",
"NotAuthenticatedError",
"SilentAuthFailedError",
"TokenClaims",
"TokenExpiredError",
"TokenSignatureError",
"TokenStore",
"TokenValidator",
"check_auth",
"ensure_authenticated",
"get_current_claims",
"require_auth",
"set_auth_manager",
"set_authorization_header",
"set_token_validator",
]