§
    (ê[f  ã                   ó    —  G d „ d¦  «        Z dS )c                   ód   — e Zd ZdZdZdddddœZ	 	 dd„Zd„ Zed„ ¦   «         Z		 	 dd
„Z
	 	 dd„ZdS )ÚBearerTokenGeneratoraà  Bearer token generator which can create the payload for token response
    by OAuth 2 server. A typical token response would be:

    .. code-block:: http

        HTTP/1.1 200 OK
        Content-Type: application/json;charset=UTF-8
        Cache-Control: no-store
        Pragma: no-cache

        {
            "access_token":"mF_9.B5f-4.1JqM",
            "token_type":"Bearer",
            "expires_in":3600,
            "refresh_token":"tGzv3JOkF0XG5Qx2TlKWIA"
        }
    i  i / )Úauthorization_codeÚimplicitÚpasswordÚclient_credentialsNc                 ó0   — || _         || _        || _        d S ©N)Úaccess_token_generatorÚrefresh_token_generatorÚexpires_generator)Úselfr
   r   r   s       úP/var/www/piapp/venv/lib/python3.11/site-packages/authlib/oauth2/rfc6750/token.pyÚ__init__zBearerTokenGenerator.__init__   s"   € ð '=ˆÔ#Ø'>ˆÔ$Ø!2ˆÔÐÐó    c                 óþ   — | j         €!| j                             || j        ¦  «        }nTt	          | j         ¦  «        r|                       ||¦  «        }n)t          | j         t          ¦  «        r| j         }n| j        }|S r	   )r   ÚGRANT_TYPES_EXPIRES_INÚgetÚDEFAULT_EXPIRES_INÚcallableÚ
isinstanceÚint)r   ÚclientÚ
grant_typeÚ
expires_ins       r   Ú_get_expires_inz$BearerTokenGenerator._get_expires_in%   s„   € ØÔ!Ð)ØÔ4×8Ò8Ø˜DÔ3ñ5ô 5ˆJˆJå�dÔ,Ñ-Ô-ð 	1Ø×/Ò/°¸
ÑCÔCˆJˆJÝ˜Ô.µÑ4Ô4ð 	1ØÔ/ˆJˆJàÔ0ˆJØÐr   c                 ó4   — |r|                       |¦  «        }|S r	   )Úget_allowed_scope)r   Úscopes     r   r   z&BearerTokenGenerator.get_allowed_scope1   s"   € àð 	4Ø×,Ò,¨UÑ3Ô3ˆEØˆr   Tc                 ó  — |                       ||¦  «        }|                      ||||¬¦  «        }|€|                      ||¦  «        }d|dœ}|r||d<   |r#| j        r|                      ||||¬¦  «        |d<   |r||d<   |S )aÈ  Generate a bearer token for OAuth 2.0 authorization token endpoint.

        :param client: the client that making the request.
        :param grant_type: current requested grant_type.
        :param user: current authorized user.
        :param expires_in: if provided, use this value as expires_in.
        :param scope: current requested scope.
        :param include_refresh_token: should refresh_token be included.
        :return: Token dict
        )r   r   Úuserr   NÚBearer)Ú
token_typeÚaccess_tokenr   Úrefresh_tokenr   )r   r
   r   r   )	r   r   r   r    r   r   Úinclude_refresh_tokenr#   Útokens	            r   ÚgeneratezBearerTokenGenerator.generate7   sÖ   € ð ×&Ò& v¨uÑ5Ô5ˆØ×2Ò2Ø j°tÀ5ð 3ñ Jô JˆàÐØ×-Ò-¨f°jÑAÔAˆJð #Ø(ð
ð 
ˆð ð 	-Ø",ˆE�,ÑØ ð 	N TÔ%Að 	NØ%)×%AÒ%AØ¨*¸4Àuð &Bñ &Nô &NˆE�/Ñ"àð 	#Ø"ˆE�'‰NØˆr   c                 ó6   — |                       ||||||¦  «        S r	   )r'   )r   r   r   r    r   r   r%   s          r   Ú__call__zBearerTokenGenerator.__call__V   s   € à�}Š}˜Z¨°°u¸jÐJ_Ñ`Ô`Ð`r   )NN)NNNT)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   Ústaticmethodr   r'   r)   © r   r   r   r      sÇ   € € € € € ðð ð& Ðð %ØØØ$ð	ð Ðð *.Ø#'ð3ð 3ð 3ð 3ð
ð 
ð 
ð ðð ñ „\ðð
 =AØ8<ðð ð ð ð> =AØ8<ðað að að að að ar   r   N)r   r/   r   r   ú<module>r0      sK   ððWað Wað Wað Wað Wañ Waô Wað Wað Wað War   