Browse Source

Merge branch 'master' of https://github.com/rhysrevans3/fastapi

pull/11560/head
rhysrevans3 3 months ago
parent
commit
890113fbc5
  1. 15
      fastapi/security/oauth2.py

15
fastapi/security/oauth2.py

@ -1,17 +1,16 @@
from typing import Any, Dict, List, Optional, Union, cast
from starlette.requests import Request
from starlette.status import HTTP_401_UNAUTHORIZED, HTTP_403_FORBIDDEN
# TODO: import from typing when deprecating Python 3.9
from typing_extensions import Annotated, Doc
from fastapi.exceptions import HTTPException
from fastapi.openapi.models import OAuth2 as OAuth2Model
from fastapi.openapi.models import OAuthFlows as OAuthFlowsModel
from fastapi.param_functions import Form
from fastapi.security.base import SecurityBase
from fastapi.security.utils import get_authorization_scheme_param
from starlette.requests import Request
from starlette.status import HTTP_401_UNAUTHORIZED, HTTP_403_FORBIDDEN
# TODO: import from typing when deprecating Python 3.9
from typing_extensions import Annotated, Doc
class OAuth2PasswordRequestForm:
@ -726,9 +725,7 @@ class SecurityScopes:
The list of all the scopes required by dependencies.
"""
),
] = (
scopes or []
)
] = scopes or []
self.scope_str: Annotated[
str,
Doc(

Loading…
Cancel
Save