<s> import requests <EOL> from allauth . socialaccount . providers . oauth2 . views import ( OAuth2Adapter , <EOL> OAuth2LoginView , <EOL> OAuth2CallbackView ) <EOL> from . provider import AngelListProvider <EOL> class AngelListOAuth2Adapter ( OAuth2Adapter ) : <EOL> provider_id = AngelListProvider . id <EOL> access_token_url = '<STR_LIT>' <EOL> authorize_url = '<STR_LIT>' <EOL> profile_url = '<STR_LIT>' <EOL> supports_state = False <EOL> def complete_login ( self , request , app , token , ** kwargs ) : <EOL> resp = requests . get ( self . profile_url , <EOL> params = { '<STR_LIT>' : token . token } ) <EOL> extra_data = resp . json ( ) <EOL> return self . get_provider ( ) . sociallogin_from_response ( request , <EOL> extra_data ) <EOL> oauth2_login = OAuth2LoginView . adapter_view ( AngelListOAuth2Adapter ) <EOL> oauth2_callback = OAuth2CallbackView . adapter_view ( AngelListOAuth2Adapter ) </s>
