diff --git a/litellm/proxy/auth_v2/errors.py b/litellm/proxy/auth_v2/errors.py index 965589e3a58..a7c5950790f 100644 --- a/litellm/proxy/auth_v2/errors.py +++ b/litellm/proxy/auth_v2/errors.py @@ -3,9 +3,6 @@ from __future__ import annotations from typing import Optional from fastapi import HTTPException -from fastapi.responses import JSONResponse - -SCIM_ERROR_SCHEMA = "urn:ietf:params:scim:api:messages:2.0:Error" class AuthError(HTTPException): @@ -55,16 +52,3 @@ def forbidden_permission() -> AuthError: def account_disabled() -> AuthError: return AuthError(403, "Account disabled") - - -def scim_error_response(exc: Exception) -> JSONResponse: - status_code = exc.status_code if isinstance(exc, HTTPException) else 500 - detail = exc.detail if isinstance(exc, HTTPException) else "Internal server error" - return JSONResponse( - status_code=status_code, - content={ - "schemas": [SCIM_ERROR_SCHEMA], - "status": str(status_code), - "detail": str(detail), - }, - ) diff --git a/litellm/proxy/auth_v2/oidc/__init__.py b/litellm/proxy/auth_v2/oidc/__init__.py index 1112293efd3..0e9c3e12a15 100644 --- a/litellm/proxy/auth_v2/oidc/__init__.py +++ b/litellm/proxy/auth_v2/oidc/__init__.py @@ -1,9 +1,4 @@ from .config import OIDCProviderConfig -from .router import _provider_key, _user_from_userinfo, build_oidc_router +from .router import build_oidc_router -__all__ = [ - "OIDCProviderConfig", - "build_oidc_router", - "_provider_key", - "_user_from_userinfo", -] +__all__ = ["OIDCProviderConfig", "build_oidc_router"] diff --git a/litellm/proxy/auth_v2/saml/__init__.py b/litellm/proxy/auth_v2/saml/__init__.py index c8e4e7548bb..c6eb35a995e 100644 --- a/litellm/proxy/auth_v2/saml/__init__.py +++ b/litellm/proxy/auth_v2/saml/__init__.py @@ -1,15 +1,4 @@ from .config import SAMLConfig -from .router import ( - _map_attributes, - _metadata_source, - _user_from_mapped, - build_saml_router, -) +from .router import build_saml_router -__all__ = [ - "SAMLConfig", - "build_saml_router", - "_map_attributes", - "_metadata_source", - "_user_from_mapped", -] +__all__ = ["SAMLConfig", "build_saml_router"] diff --git a/litellm/proxy/auth_v2/security.py b/litellm/proxy/auth_v2/security.py index ef0bc89e782..d311019bec2 100644 --- a/litellm/proxy/auth_v2/security.py +++ b/litellm/proxy/auth_v2/security.py @@ -40,9 +40,6 @@ class AuthSecurity: uvicorn with ``--no-proxy-headers`` and let this module resolve the client IP, or leave ``trusted_proxy_cidrs`` empty and rely on uvicorn's ``--forwarded-allow-ips``. Do not enable both. - - To return SCIM-shaped error bodies, register ``errors.scim_error_response`` as - the host app's exception handler for the SCIM routes. """ def __init__(