
    ?hX
                         d Z ddlmZ ddlmZmZmZ ddlmZ ee	ee	   f   Z
e G d d             Ze G d d             Ze G d	 d
             Ze G d d             Zeeeef   Zeeef   Zy)z#
Authentication class definitions.
    )	dataclass)OptionalUnionList)	_Warningsc                   8    e Zd ZU dZeed<   dZee   ed<   ddZ	y)AuthClientCredentialsaq  Authenticate for the Client Credential flow using client secrets.

    Acquire the client secret from your identify provider and set the appropriate scope. The client includes hardcoded
    scopes for Azure, otherwise it needs to be supplied.
    Scopes can be given as:
      - List of strings: ["scope1", "scope2"]
      - space separated string: "scope1 scope2"
    client_secretNscopec                     | j                   g | _        y t        | j                   t              r!| j                   j	                  d      | _        y t        | j                   t
              r| j                   | _        y y N r   
scope_list
isinstancestrsplitlistselfs    K/home/chris/cleankitchens-env/lib/python3.12/site-packages/weaviate/auth.py__post_init__z#AuthClientCredentials.__post_init__   U    ::)+DO

C("jj..s3DO

D)"jjDO *    returnN
__name__
__module____qualname____doc__r   __annotations__r   r   SCOPESr    r   r   r	   r	      s#     "E8F")r   r	   c                   B    e Zd ZU dZeed<   eed<   dZee   ed<   ddZ	y)AuthClientPassworda  Using username and password for authentication with Resource Owner Password flow.

    For some providers the scope needs to contain "offline_access" (and "openid" which is automatically added) to return
    a refresh token. Without a refresh token the authentication will expire once the lifetime of the access token is up.
    Scopes can be given as:
      - List of strings: ["scope1", "scope2"]
      - space separated string: "scope1 scope2"

    usernamepasswordNr   c                     | j                   g | _        y t        | j                   t              r!| j                   j	                  d      | _        y t        | j                   t
              r| j                   | _        y y r   r   r   s    r   r   z AuthClientPassword.__post_init__3   r   r   r   r   r$   r   r   r&   r&   #   s'     MM"E8F")r   r&   c                   F    e Zd ZU dZeed<   dZeed<   dZe	e   ed<   ddZ
y)	AuthBearerTokena   Using a preexisting bearer/access token for authentication.

    The expiration time of access tokens is given in seconds.

    Only the access token is required. However, when no refresh token is given, the authentication will expire once
    the lifetime of the access token is up.
    access_token<   
expires_inNrefresh_tokenc                 |    | j                   r0| j                   dk  r t        j                  | j                          y y y )Nr   )r.   r   auth_negative_expiration_timer   s    r   r   zAuthBearerToken.__post_init__J   s-    ??t233DOOD  3?r   r   )r   r   r    r!   r   r"   r.   intr/   r   r   r$   r   r   r+   r+   <   s-     J#'M8C='Er   r+   c                       e Zd ZU dZeed<   y)
AuthApiKeyz6Using the given API key to authenticate with weaviate.api_keyN)r   r   r    r!   r   r"   r$   r   r   r4   r4   O   s
    @Lr   r4   N)r!   dataclassesr   typingr   r   r   weaviate.warningsr   r   r#   r	   r&   r+   r4   OidcAuthAuthCredentialsr$   r   r   <module>r;      s    " ( ( '	sDI~	 ) ) ), ) ) )0 E E E$    "46KKL*,-r   