Ë
    ”ÂiÄ  ã                   ó,   — d dl mZ 	 dd„Zdd„Z	 dd„Zy)é    )ÚTemporaryCredentialc                 óÈ   ‡‡— ˆˆfd„}ˆˆfd„}ˆˆfd„}ˆˆfd„}| j                  d|«       | j                  d|«       | j                  d|«       | j                  d|«       y	)
zäRegister temporary credential related hooks to authorization server.

    :param authorization_server: AuthorizationServer instance
    :param cache: Cache instance
    :param key_prefix: key prefix for temporary credential
    c                 ój   •— ‰| d   z   }|| d<   |r|| d<   ‰j                  || d¬«       t        | «      S )NÚoauth_tokenÚ	client_idÚoauth_callbacké€Q ©Útimeout)Úsetr   )Útokenr   Úredirect_uriÚkeyÚcacheÚ
key_prefixs       €€ú_/var/www/timesheet/venv/lib/python3.12/site-packages/authlib/integrations/flask_oauth1/cache.pyÚcreate_temporary_credentialzHregister_temporary_credential_hooks.<locals>.create_temporary_credential   sG   ø€ Ø˜5 Ñ/Ñ/ˆØ&ˆˆkÑÙØ&2ˆEÐ"Ñ#à�	‰	�#�u eˆ	Ô,Ü" 5Ó)Ð)ó    c                 óR   •— | sy ‰| z   }‰j                  |«      }|rt        |«      S y ©N)Úgetr   )r   r   Úvaluer   r   s      €€r   Úget_temporary_credentialzEregister_temporary_credential_hooks.<locals>.get_temporary_credential   s3   ø€ ÙØØ˜;Ñ&ˆØ—	‘	˜#“ˆÙÜ& uÓ-Ð-ð r   c                 ó8   •— | r‰| z   }‰j                  |«       y y r   )Údelete)r   r   r   r   s     €€r   Údelete_temporary_credentialzHregister_temporary_credential_hooks.<locals>.delete_temporary_credential   s!   ø€ ÙØ˜{Ñ*ˆCØ�L‰L˜Õð r   c                 ó†   •— ‰| j                  «       z   }|| d<   |j                  «       | d<   ‰j                  || d¬«       | S )NÚoauth_verifierÚuser_idr	   r
   )Úget_oauth_tokenÚget_user_idr   )Ú
credentialÚ
grant_userÚverifierr   r   r   s       €€r   Úcreate_authorization_verifierzJregister_temporary_credential_hooks.<locals>.create_authorization_verifier$   sL   ø€ Ø˜:×5Ñ5Ó7Ñ7ˆØ'/ˆ
Ð#Ñ$Ø *× 6Ñ 6Ó 8ˆ
�9ÑØ�	‰	�#�z¨5ˆ	Ô1ØÐr   r   r   r   r%   N)Úregister_hook)Úauthorization_serverr   r   r   r   r   r%   s    ``    r   Ú#register_temporary_credential_hooksr(      so   ù€ õ*õ.õõ
ð ×&Ñ&Ø%Ð'Bôð ×&Ñ&Ø"Ð$<ôð ×&Ñ&Ø%Ð'Bôð ×&Ñ&Ø'Ð)Fõr   c                 ó   ‡ ‡‡— ˆ ˆˆfd„}|S )zåCreate an ``exists_nonce`` function that can be used in hooks and
    resource protector.

    :param cache: Cache instance
    :param key_prefix: key prefix for temporary credential
    :param expires: Expire time for nonce
    c                 ó|   •— ‰› | › d|› d|› �}|r|› d|› �}‰j                  |«      }‰j                  |d‰¬«       |S )Nú-é   r
   )Úhasr   )	ÚnonceÚ	timestampr   r   r   Úrvr   Úexpiresr   s	         €€€r   Úexists_noncez.create_exists_nonce_func.<locals>.exists_nonceB   sT   ø€ Ø�˜U˜G 1 Y K¨q°°Ð<ˆÙØ�E˜˜;˜-Ð(ˆCØ�Y‰Y�s‹^ˆØ�	‰	�#�q 'ˆ	Ô*Øˆ	r   © )r   r   r1   r2   s   ``` r   Úcreate_exists_nonce_funcr4   9   s   ú€ öð Ðr   c                 óB   — t        |||«      }| j                  d|«       y)zÿRegister nonce related hooks to authorization server.

    :param authorization_server: AuthorizationServer instance
    :param cache: Cache instance
    :param key_prefix: key prefix for temporary credential
    :param expires: Expire time for nonce
    r2   N)r4   r&   )r'   r   r   r1   r2   s        r   Úregister_nonce_hooksr6   M   s"   € ô ,¨E°:¸wÓG€LØ×&Ñ& ~°|ÕDr   N)ztemporary_credential:)znonce:r	   )Úauthlib.oauth1r   r(   r4   r6   r3   r   r   ú<module>r8      s%   ðÝ .ð -Dó2ójð* ?DôEr   