
    )Jfd                     |    d dl Z d dlmZ d dlmZ d dlmZ d dlmZ  G d de          Z	 G d d	e          Z
e
gZdS )
    N)	urlencode)EmailAddress)ProviderAccount)OAuth2Providerc                   *     e Zd Zd Zd Z fdZ xZS )FrontierAccountc                     d S )N selfs    t/home/alex/cs2snipeproduction/venv/lib/python3.11/site-packages/allauth/socialaccount/providers/frontier/provider.pyget_profile_urlzFrontierAccount.get_profile_url
   s    t    c                     dt          j        | j        j                            d                                                              d                                                    dt          ddi          S )Nz https://www.gravatar.com/avatar/emailzutf-8?dmp)	hashlibmd5account
extra_datagetlowerencode	hexdigestr   r   s    r   get_avatar_urlzFrontierAccount.get_avatar_url   st     K'++G44::<<CCGLL ikk  sDk"""	
 	
r   c                     t          t          |                                           }| j        j                            d|          d| j        j                            d|          }|S )N	firstname lastname)superr   to_strr   r   r   )r   dflt	full_name	__class__s      r   r#   zFrontierAccount.to_str   sf    _d++2244L#''T::::L#''
D999
	 r   )__name__
__module____qualname__r   r   r#   __classcell__)r&   s   @r   r   r   	   sV          
 
 
        r   r   c                   2    e Zd ZdZdZeZd Zd Zd Z	d Z
dS )FrontierProviderfrontierFrontierc                     ddg}|S )Nauthcapir
   )r   scopes     r   get_default_scopez"FrontierProvider.get_default_scope#   s     r   c                 ,    t          |d                   S )Ncustomer_id)strr   datas     r   extract_uidzFrontierProvider.extract_uid'   s    4&'''r   c                     t          |                    d          |                    d          |                    d          |                    d                    S )Nr   r!   r   )r   username	last_name
first_name)dictr   r7   s     r   extract_common_fieldsz&FrontierProvider.extract_common_fields*   sU    ((7##XXg&&hhz**xx,,	
 
 
 	
r   c                     g }|                     d          }|r%|                    t          |dd                     |S )Nr   T)r   verifiedprimary)r   appendr   )r   r8   retr   s       r   extract_email_addressesz(FrontierProvider.extract_email_addresses2   sG    !! 	OJJ|%$MMMNNN
r   N)r'   r(   r)   idnamer   account_classr3   r9   r?   rE   r
   r   r   r,   r,      s_        	BD#M  ( ( (
 
 
    r   r,   )r   urllib.parser   allauth.account.modelsr   $allauth.socialaccount.providers.baser   /allauth.socialaccount.providers.oauth2.providerr   r   r,   provider_classesr
   r   r   <module>rN      s     " " " " " " / / / / / / @ @ @ @ @ @ J J J J J J    o   *    ~   8 %%   r   