관리-도구
편집 파일: service_application.cpython-39.pyc
a \��`� � @ sD d Z ddlZddlmZ ddlmZ ddlmZ G dd � d e�ZdS ) z� oauthlib.oauth2.rfc6749 ~~~~~~~~~~~~~~~~~~~~~~~ This module is an implementation of various logic needed for consuming and providing OAuth 2.0 RFC6749. � N)� to_unicode� )�prepare_token_request� )�Clientc s0 e Zd ZdZdZd � fdd� Zddd �Z� ZS )�ServiceApplicationClienta� A public client utilizing the JWT bearer grant. JWT bearer tokes can be used to request an access token when a client wishes to utilize an existing trust relationship, expressed through the semantics of (and digital signature or keyed message digest calculated over) the JWT, without a direct user approval step at the authorization server. This grant type does not involve an authorization step. It may be used by both public and confidential clients. z+urn:ietf:params:oauth:grant-type:jwt-bearerNc s0 t � j|fi |�� || _|| _|| _|| _dS )ac Initalize a JWT client with defaults for implicit use later. :param client_id: Client identifier given by the OAuth provider upon registration. :param private_key: Private key used for signing and encrypting. Must be given as a string. :param subject: The principal that is the subject of the JWT, i.e. which user is the token requested on behalf of. For example, ``foo@example.com. :param issuer: The JWT MUST contain an "iss" (issuer) claim that contains a unique identifier for the entity that issued the JWT. For example, ``your-client@provider.com``. :param audience: A value identifying the authorization server as an intended audience, e.g. ``https://provider.com/oauth2/token``. :param kwargs: Additional arguments to pass to base client, such as state and token. See ``Client.__init__.__doc__`` for details. N)�super�__init__�private_key�subject�issuer�audience)�self� client_idr r r r �kwargs�� __class__� �W/usr/lib/python3.9/site-packages/oauthlib/oauth2/rfc6749/clients/service_application.pyr s z!ServiceApplicationClient.__init__� Fc K s ddl }|p| j} | std��|p&| j|p.| j|p6| jt|pFt�� d �t|pTt�� �d�}dD ]}|| du r`td| ��q`d|v r�|�d�|d <