
    6i                        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         _/home/azureuser/techstart-app/venv/lib/python3.12/site-packages/azure/core/credentials_async.py	get_tokenzAsyncTokenCredential.get_token   s     * 	   c                   K   ywzcClose the credential, releasing any resources.

        :return: None
        :rtype: None
        Nr   r   s    r   closezAsyncTokenCredential.close)        r   c                   K   y wNr   r   exc_type	exc_value	tracebacks       r   	__aexit__zAsyncTokenCredential.__aexit__0         	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.   r0   )__name__
__module____qualname____doc__r   r!   r)   r       r   r   r      s    <
 !%#'   !	
   
. 37-1-1	/ + +	
 
r7   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   r:   r   s      r   get_token_infoz%AsyncSupportsTokenInfo.get_token_info=   s      	r   c                   K   ywr   r   r    s    r   r!   zAsyncSupportsTokenInfo.closeL   r"   r   c                   K   y wr$   r   r%   s       r   r)   z AsyncSupportsTokenInfo.__aexit__S   r*   r   )r   r+   r:   zOptional[TokenRequestOptions]r.   r   r/   r1   r2   )r3   r4   r5   r6   r<   r!   r)   r   r7   r   r9   r9   9   sH    ^Z^  37-1-1	/ + +	
 
r7   r9   N)
__future__r   typesr   typingr   r   r   r   r	   r
   typing_extensionsr   r   credentialsr   r   r   r   r9   AsyncTokenProviderr   r7   r   <module>rE      s}   
 #  Q Q 9NN '8%89O%P ' 'T X':;S'T  D /1GGH r7   