o
    RDi                     @   sf   d dl mZ d dl mZ ddlmZ G dd dZG dd deZG d	d
 d
eZdd Zdd Z	dS )    )UNICODE_ASCII_CHARACTER_SET)generate_client_id   )oauth2_settingsc                   @   s   e Zd ZdZdd ZdS )BaseHashGeneratorzN
    All generators should extend this class overriding `.hash()` method.
    c                 C   s   t  )N)NotImplementedErrorself r
   S/var/www/Datamplify/venv/lib/python3.10/site-packages/oauth2_provider/generators.pyhash   s   zBaseHashGenerator.hashN)__name__
__module____qualname____doc__r   r
   r
   r
   r   r      s    r   c                   @      e Zd Zdd ZdS )ClientIdGeneratorc                 C   s   t dtdS )z
        Generate a client_id for Basic Authentication scheme without colon char
        as in https://rfc-editor.org/rfc/rfc2617.html#section-2
        (   lengthchars)oauthlib_generate_client_idr   r   r
   r
   r   r      s   zClientIdGenerator.hashNr   r   r   r   r
   r
   r
   r   r          r   c                   @   r   )ClientSecretGeneratorc                 C   s   t j}t}t||dS )Nr   )r   CLIENT_SECRET_GENERATOR_LENGTHr   r   )r	   r   r   r
   r
   r   r      s   zClientSecretGenerator.hashNr   r
   r
   r
   r   r      r   r   c                  C      t  } |  S )z'
    Generate a suitable client id
    )r   CLIENT_ID_GENERATOR_CLASSr   )client_id_generatorr
   r
   r   r          r   c                  C   r   )z+
    Generate a suitable client secret
    )r   CLIENT_SECRET_GENERATOR_CLASSr   )client_secret_generatorr
   r
   r   generate_client_secret(   r   r"   N)
oauthlib.commonr   r   r   settingsr   r   r   r   r"   r
   r
   r
   r   <module>   s    		