class_docstr: This is the base class for OAuth2 authentication, an instance of it would be used
  as a dependency. All other OAuth2 classes inherit from it and customize it for
  each OAuth2 flow.
  
  You normally would not create a new class inheriting from it but use one of the
  existing subclasses, and maybe compose them if you want to support multiple flows.
  
  Read more about it in the
  [FastAPI docs for Security](https://fastapi.tiangolo.com/tutorial/security/).
class_docstr_tok: ["This","is","the","base","class","for","OAuth2","authentication",",","an","instance","of","it","would","be","used","as","a","dependency",".","All","other","OAuth2","classes","inherit","from","it","and","customize","it","for","each","OAuth2","flow",".","You","normally","would","not","create","a","new","class","inheriting","from","it","but","use","one","of","the","existing","subclasses",",","and","maybe","compose","them","if","you","want","to","support","multiple","flows",".","Read","more","about","it","in","the","[","FastAPI","docs","for","Security","]","(","https",":","\/\/fastapi.tiangolo.com\/tutorial\/security\/",")","."]
code: def __init__(
      self,
      *,
      flows: Annotated[
          Union[OAuthFlowsModel, Dict[str, Dict[str, Any]]],
          Doc(
              """
                  The dictionary of OAuth2 flows.
                  """
          ),
      ] = OAuthFlowsModel(),
      scheme_name: Annotated[
          Optional[str],
          Doc(
              """
                  Security scheme name.
  
                  It will be included in the generated OpenAPI (e.g. visible at `/docs`).
                  """
          ),
      ] = None,
      description: Annotated[
          Optional[str],
          Doc(
              """
                  Security scheme description.
  
                  It will be included in the generated OpenAPI (e.g. visible at `/docs`).
                  """
          ),
      ] = None,
      auto_error: Annotated[
          bool,
          Doc(
              """
                  By default, if no HTTP Authorization header is provided, required for
                  OAuth2 authentication, it will automatically cancel the request and
                  send the client an error.
  
                  If `auto_error` is set to `False`, when the HTTP Authorization header
                  is not available, instead of erroring out, the dependency result will
                  be `None`.
  
                  This is useful when you want to have optional authentication.
  
                  It is also useful when you want to have authentication that can be
                  provided in one of multiple optional ways (for example, with OAuth2
                  or in a cookie).
                  """
          ),
      ] = True,
  ):
      self.model = OAuth2Model(
          flows=cast(OAuthFlowsModel, flows), description=description
      )
      self.scheme_name = scheme_name or self.__class__.__name__
      self.auto_error = auto_error
  
imports: from typing import Any, Dict, List, Optional, Union, cast
  from fastapi.exceptions import HTTPException
  from fastapi.openapi.models import OAuth2
  from fastapi.openapi.models import OAuthFlows
  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
  from typing_extensions import Annotated, Doc
label_desc: Use image node_id 1 to create a new OAuth2 object from inherited base classes: SecurityBase with example: obj = OAuth2()