取消AUTH_DISABLED参数
This commit is contained in:
@@ -14,8 +14,6 @@ oauth2_optional = OAuth2PasswordBearer(
|
||||
async def get_current_keycloak_sub(
|
||||
token: str | None = Depends(oauth2_optional),
|
||||
) -> UUID:
|
||||
if settings.AUTH_DISABLED:
|
||||
return UUID(int=0)
|
||||
if not token:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_401_UNAUTHORIZED,
|
||||
|
||||
Reference in New Issue
Block a user