Ë
    ûûàg
  ã                   óŽ   — d dl mZ d dlmZ d dlmZmZmZ  G d„ de«      Z ej                  e«      Z
 ej                  e«      Zy)é    )Úget_adapter)ÚProviderException)ÚOAuth2AdapterÚOAuth2CallbackViewÚOAuth2LoginViewc                   ó&   — e Zd ZdZdZdZdZdZd„ Zy)ÚDataportenOAuth2AdapterÚ
dataportenz&https://auth.dataporten.no/oauth/tokenz.https://auth.dataporten.no/oauth/authorizationz#https://auth.dataporten.no/userinfoz(https://groups-api.dataporten.no/groups/c                 óf  — dd|j                   z   i}t        «       j                  «       j                  | j                  |¬«      }|j                  «        |j                  «       d   }|j                  «       d   |j                  k7  rt        d«      ‚| j                  «       j                  ||«      S )a  
        Arguments:
            request - The get request to the callback URL
                        /accounts/dataporten/login/callback.
            app - The corresponding SocialApp model instance
            token - A token object with access token given in token.token
        Returns:
            Should return a dict with user information intended for parsing
            by the methods of the DataportenProvider view, i.e.
            extract_uid(), extract_extra_data(), and extract_common_fields()
        ÚAuthorizationzBearer )ÚheadersÚuserÚaudiencez’Dataporten returned a user with an audience field                  which does not correspond to the client id of the                  application.)Útokenr   Úget_requests_sessionÚgetÚprofile_urlÚraise_for_statusÚjsonÚ	client_idr   Úget_providerÚsociallogin_from_response)ÚselfÚrequestÚappr   Úkwargsr   Úuserinfo_responseÚ
extra_datas           ún/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/allauth/socialaccount/providers/dataporten/views.pyÚcomplete_loginz&DataportenOAuth2Adapter.complete_login   s¼   € ð # I°·±Ñ$;Ð<ˆô
 ‹Mß!Ñ!Ó#ß‰SØ× Ñ Øð ó ð 	ð 	×*Ñ*Ô,ð '×+Ñ+Ó-¨fÑ5ˆ
ð
 ×!Ñ!Ó# JÑ/°3·=±=Ò@Ü#ðóð ð × Ñ Ó"×<Ñ<ØØó
ð 	
ó    N)	Ú__name__Ú
__module__Ú__qualname__Úprovider_idÚaccess_token_urlÚauthorize_urlr   Ú
groups_urlr    © r!   r   r	   r	   
   s!   „ Ø€KØ?ÐØD€MØ7€KØ;€Jó,
r!   r	   N)Úallauth.socialaccount.adapterr   Ú$allauth.socialaccount.providers.baser   Ú,allauth.socialaccount.providers.oauth2.viewsr   r   r   r	   Úadapter_viewÚoauth2_loginÚoauth2_callbackr)   r!   r   ú<module>r0      sK   ðÝ 5Ý B÷ñ ô3
˜mô 3
ðl ,ˆ×+Ñ+Ð,CÓD€Ø1Ð$×1Ñ1Ð2IÓJ�r!   