
    ]h                        d dl mZ d dlmZ d dlmZmZmZmZm	Z	m
Z
 d dlmZmZ e
r
ddlmZmZmZ e G d deed                Ze G d	 d
eed
                Ze	eef   Zy)    )annotations)TracebackType)AnyOptionalAsyncContextManagerTypeUnionTYPE_CHECKING)Protocolruntime_checkable   )AccessTokenAccessTokenInfoTokenRequestOptionsc                  ^    e Zd ZdZdddd	 	 	 	 	 	 	 	 	 	 	 ddZd	dZ	 	 	 d
	 	 	 	 	 	 	 ddZy)AsyncTokenCredentialz2Protocol for classes able to provide OAuth tokens.NF)claims	tenant_id
enable_caec                  K   yw)a  Request an access token for `scopes`.

        :param str scopes: The type of access needed.

        :keyword str claims: Additional claims required in the token, such as those returned in a resource
            provider's claims challenge following an authorization failure.
        :keyword str tenant_id: Optional tenant to include in the token request.
        :keyword bool enable_cae: Indicates whether to enable Continuous Access Evaluation (CAE) for the requested
            token. Defaults to False.

        :rtype: AccessToken
        :return: An AccessToken instance containing the token string and its expiration time in Unix time.
        N )selfr   r   r   scopeskwargss         b/var/www/core.comfia.cic-ware.com/crm/lib/python3.12/site-packages/azure/core/credentials_async.py	get_tokenzAsyncTokenCredential.get_token   s     * 	   c                   K   y wNr   r   s    r   closezAsyncTokenCredential.close)   	     r   c                   K   y wr   r   r   exc_type	exc_value	tracebacks       r   	__aexit__zAsyncTokenCredential.__aexit__,         	r   )r   strr   Optional[str]r   r+   r   boolr   r   returnr   r-   NoneNNNr%   zOptional[Type[BaseException]]r&   zOptional[BaseException]r'   zOptional[TracebackType]r-   r/   )__name__
__module____qualname____doc__r   r!   r(   r       r   r   r      s    <
 !%#'   !	
   
.
 37-1-1	/ + +	
 
r6   r   c                  D    e Zd ZdZddddZddZ	 	 	 d		 	 	 	 	 	 	 d
dZy)AsyncSupportsTokenInfozTProtocol for classes able to provide OAuth access tokens with additional properties.N)optionsc                  K   yw)a  Request an access token for `scopes`.

        This is an alternative to `get_token` to enable certain scenarios that require additional properties
        on the token.

        :param str scopes: The type of access needed.
        :keyword options: A dictionary of options for the token request. Unknown options will be ignored. Optional.
        :paramtype options: TokenRequestOptions

        :rtype: AccessTokenInfo
        :return: An AccessTokenInfo instance containing the token string and its expiration time in Unix time.
        Nr   )r   r9   r   s      r   get_token_infoz%AsyncSupportsTokenInfo.get_token_info9   s      	r   c                   K   y wr   r   r    s    r   r!   zAsyncSupportsTokenInfo.closeH   r"   r   c                   K   y wr   r   r$   s       r   r(   z AsyncSupportsTokenInfo.__aexit__K   r)   r   )r   r*   r9   zOptional[TokenRequestOptions]r-   r   r.   r0   r1   )r2   r3   r4   r5   r;   r!   r(   r   r6   r   r8   r8   5   sH    ^Z^ 
 37-1-1	/ + +	
 
r6   r8   N)
__future__r   typesr   typingr   r   r   r   r	   r
   typing_extensionsr   r   credentialsr   r   r   r   r8   AsyncTokenProviderr   r6   r   <module>rD      s|   
 #  Q Q 9NN #8%89O%P # #L X':;S'T  < /1GGH r6   