o
    ˜Ì³i“  ã                   @   sP   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
mZ G dd„ deƒZdS )é    )ÚHttpRedirect)ÚKaggleHttpClient)ÚExchangeOAuthTokenRequestÚExchangeOAuthTokenResponseÚIntrospectTokenRequestÚIntrospectTokenResponseÚRegisterOAuthClientRequestÚRegisterOAuthClientResponseÚStartOAuthFlowRequestc                   @   sj   e Zd Zdefdd„Zddedefdd„Zddede	fd	d
„Z
ddedefdd„Zddedefdd„ZdS )ÚOAuthClientÚclientc                 C   s
   || _ d S ©N)Ú_client)Úselfr   © r   ú]/home/ubuntu/.local/lib/python3.10/site-packages/kagglesdk/security/services/oauth_service.pyÚ__init__   s   
zOAuthClient.__init__NÚrequestÚreturnc                 C   ó    |du rt ƒ }| j dd|t¡S )z‚
    Args:
      request (StartOAuthFlowRequest):
        The request object; initialized to empty instance if not specified.
    Núsecurity.OAuthServiceÚStartOAuthFlow)r
   r   Úcallr   ©r   r   r   r   r   Ústart_oauth_flow
   ó   zOAuthClient.start_oauth_flowc                 C   r   )z†
    Args:
      request (ExchangeOAuthTokenRequest):
        The request object; initialized to empty instance if not specified.
    Nr   ÚExchangeOAuthToken)r   r   r   r   r   r   r   r   Úexchange_oauth_token   r   z OAuthClient.exchange_oauth_tokenc                 C   r   )zƒ
    Args:
      request (IntrospectTokenRequest):
        The request object; initialized to empty instance if not specified.
    Nr   ÚIntrospectToken)r   r   r   r   r   r   r   r   Úintrospect_token"   r   zOAuthClient.introspect_tokenc                 C   r   )z¼
    Dynamic Client Registration Endpoint (RFC 7591)

    Args:
      request (RegisterOAuthClientRequest):
        The request object; initialized to empty instance if not specified.
    Nr   ÚRegisterOAuthClient)r   r   r   r	   r   r   r   r   Úregister_oauth_client.   s   	z!OAuthClient.register_oauth_clientr   )Ú__name__Ú
__module__Ú__qualname__r   r   r
   r   r   r   r   r   r   r   r   r   r	   r!   r   r   r   r   r      s    r   N)Ú$kagglesdk.common.types.http_redirectr   Úkagglesdk.kaggle_http_clientr   Ú&kagglesdk.security.types.oauth_servicer   r   r   r   r   r	   r
   Úobjectr   r   r   r   r   Ú<module>   s    $