Browse Source

🎨 [pre-commit.ci] Auto format from pre-commit.com hooks

pull/13572/head
pre-commit-ci[bot] 4 days ago
parent
commit
805df59287
  1. 12
      fastapi/security/http.py
  2. 2
      yarn.lock

12
fastapi/security/http.py

@ -2,12 +2,7 @@ import binascii
from base64 import b64decode
from typing import Optional
from fastapi.security.base import SecurityBase
from fastapi import HTTPException, status, Depends
from fastapi.security.utils import get_authorization_scheme_param
from starlette.requests import Request
from starlette.status import HTTP_401_UNAUTHORIZED
from typing import Optional, Tuple
from fastapi import HTTPException
from fastapi.exceptions import HTTPException
from fastapi.openapi.models import HTTPBase as HTTPBaseModel
from fastapi.openapi.models import HTTPBearer as HTTPBearerModel
@ -70,17 +65,20 @@ class HTTPAuthorizationCredentials(BaseModel):
"""
),
]
class HTTPBasicCredentials(BaseModel):
username: str
password: str
class HTTPBasic(SecurityBase):
def __init__(
self,
*,
scheme_name: Optional[str] = None,
realm: str, # REQUIRED parameter (RFC 7617 compliance)
auto_error: bool = True
auto_error: bool = True,
):
self.scheme_name = scheme_name or self.__class__.__name__
self.realm = realm

2
yarn.lock

@ -1,4 +1,2 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1

Loading…
Cancel
Save