o
    &zhh                     @   sN   d dl mZ d dlmZ d dlmZ G dd deZG dd deZegZdS )	    )ProviderAccount)FiveHundredPxOAuthAdapter)OAuthProviderc                   @   s   e Zd Zdd Zdd ZdS )FiveHundredPxAccountc                 C   s   d| j jd S )Nzhttps://500px.com/%susernameaccount
extra_datagetself r   q/var/www/html/kangema/venv/lib/python3.10/site-packages/allauth/socialaccount/providers/fivehundredpx/provider.pyget_profile_url	   s   z$FiveHundredPxAccount.get_profile_urlc                 C   s   | j jdS )Nuserpic_urlr   r   r   r   r   get_avatar_url   s   z#FiveHundredPxAccount.get_avatar_urlN)__name__
__module____qualname__r   r   r   r   r   r   r      s    r   c                   @   s8   e Zd ZdZdZdZeZeZ	dd Z
dd Zdd Zd	S )
FiveHundredPxProvider500pxz-allauth.socialaccount.providers.fivehundredpxc                 C   s   g S )Nr   r   r   r   r   get_default_scope   s   z'FiveHundredPxProvider.get_default_scopec                 C   s   t |d S )Nid)strr   datar   r   r   extract_uid   s   z!FiveHundredPxProvider.extract_uidc                 C   s(   t |d|d|d|ddS )Nr   email	firstnamelastname)r   r   
first_name	last_name)dictr
   r   r   r   r   extract_common_fields   s   z+FiveHundredPxProvider.extract_common_fieldsN)r   r   r   r   namepackager   account_classr   oauth_adapter_classr   r   r#   r   r   r   r   r      s    r   N)	$allauth.socialaccount.providers.baser   3allauth.socialaccount.providers.fivehundredpx.viewsr   .allauth.socialaccount.providers.oauth.providerr   r   r   provider_classesr   r   r   r   <module>   s    
