
    f                     f    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
y	)
    )EmailAddress)ProviderAccount)OAuth2Provider)ZohoOAuth2Adapterc                       e Zd Zy)ZohoAccountN)__name__
__module____qualname__     h/var/www/cs2snipe.com/venv/lib/python3.12/site-packages/allauth/socialaccount/providers/zoho/provider.pyr   r      s    r   r   c                   4    e Zd ZdZdZeZeZd Z	d Z
d Zd Zy)ZohoProviderzohoZohoc                     dgS )Nzaaaserver.profile.READr   )selfs    r   get_default_scopezZohoProvider.get_default_scope   s    ())r   c                     t        |d         S )NZUID)strr   datas     r   extract_uidzZohoProvider.extract_uid   s    4<  r   c                 8    t        |d   |d   |d   |d         S )NEmailDisplay_Name
First_Name	Last_Name)emailusername
first_name	last_name)dictr   s     r   extract_common_fieldsz"ZohoProvider.extract_common_fields   s.    w-.)L);'	
 	
r   c                 j    g }|j                  d      }|r|j                  t        |dd             |S )Nr   FT)r!   verifiedprimary)getappendr   )r   r   retr!   s       r   extract_email_addressesz$ZohoProvider.extract_email_addresses   s<    !JJ"  
r   N)r	   r
   r   idnamer   account_classr   oauth2_adapter_classr   r   r&   r-   r   r   r   r   r      s+    	BDM,*!
r   r   N)allauth.account.modelsr   $allauth.socialaccount.providers.baser   /allauth.socialaccount.providers.oauth2.providerr   *allauth.socialaccount.providers.zoho.viewsr   r   r   provider_classesr   r   r   <module>r7      s4    / @ J H	/ 	> D !> r   