mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-03 02:22:24 +00:00
refactor(proxy): drop unused lockout action parameter
This commit is contained in:
parent
74c0e1a339
commit
29971b3011
2 changed files with 8 additions and 10 deletions
|
|
@ -138,7 +138,7 @@ def master_key_lockout_action(
|
|||
return None
|
||||
|
||||
|
||||
def master_key_lockout_exception(action: LockoutAction) -> ProxyException:
|
||||
def master_key_lockout_exception() -> ProxyException:
|
||||
return ProxyException(
|
||||
message=MASTER_KEY_LOCKOUT_MESSAGE,
|
||||
type=ProxyErrorTypes.auth_error,
|
||||
|
|
|
|||
|
|
@ -1354,15 +1354,13 @@ async def _user_api_key_auth_builder(
|
|||
_lockout_reason: Final = insecure_master_key_reason(
|
||||
master_key, alternative_auth_enabled=alternative_auth_enabled(general_settings)
|
||||
)
|
||||
if _lockout_reason is not None:
|
||||
_lockout_action: Final = master_key_lockout_action(
|
||||
route=route,
|
||||
method=request.method,
|
||||
reason=_lockout_reason,
|
||||
stored_credentials_present=stored_credentials_present(),
|
||||
)
|
||||
if _lockout_action is not None:
|
||||
raise master_key_lockout_exception(_lockout_action)
|
||||
if _lockout_reason is not None and master_key_lockout_action(
|
||||
route=route,
|
||||
method=request.method,
|
||||
reason=_lockout_reason,
|
||||
stored_credentials_present=stored_credentials_present(),
|
||||
) is not None:
|
||||
raise master_key_lockout_exception()
|
||||
with tracer.trace("litellm.proxy.auth.pre_db_read_auth_checks"):
|
||||
await pre_db_read_auth_checks(
|
||||
request_data=request_data,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue