
    ,h
                     r    d dl mZ d dlmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ d dlmZmZ  G d d	e      Zy
)    )Optional)OpenIdConnect)SecurityBase)HTTPException)Request)HTTP_403_FORBIDDEN)	AnnotatedDocc                       e Zd ZdZdddddee ed      f   deee    ed      f   d	eee    ed
      f   dee ed      f   fdZ	de
dee   fdZy)r   zc
    OpenID Connect authentication class. An instance of it would be used as a
    dependency.
    NT)scheme_namedescription
auto_erroropenIdConnectUrlz1
            The OpenID Connect URL.
            r   z
                Security scheme name.

                It will be included in the generated OpenAPI (e.g. visible at `/docs`).
                r   z
                Security scheme description.

                It will be included in the generated OpenAPI (e.g. visible at `/docs`).
                r   a  
                By default, if no HTTP Authorization header is provided, required for
                OpenID Connect 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 OpenID
                Connect or in a cookie).
                c                t    t        ||      | _        |xs | j                  j                  | _        || _        y )N)r   r   )OpenIdConnectModelmodel	__class____name__r   r   )selfr   r   r   r   s        f/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/fastapi/security/open_id_connect_url.py__init__zOpenIdConnect.__init__   s6    h (-;

 'A$..*A*A$    requestreturnc                    K   |j                   j                  d      }|s| j                  rt        t        d      y |S w)NAuthorizationzNot authenticated)status_codedetail)headersgetr   r   r   )r   r   authorizations      r   __call__zOpenIdConnect.__call__K   sB     ++O<# 2;N  s   >A )r   
__module____qualname____doc__r	   strr
   r   boolr   r   r"    r   r   r   r      s    2  ( e8% $
8% SM	
8%* SM	
+8%> 
?8%t	g 	(3- 	r   r   N)typingr   fastapi.openapi.modelsr   r   fastapi.security.baser   starlette.exceptionsr   starlette.requestsr   starlette.statusr   typing_extensionsr	   r
   r(   r   r   <module>r0      s(     F . . & / ,IL Ir   