<s> from social . backends . oauth import BaseOAuth2 <EOL> class PixelPinOAuth2 ( BaseOAuth2 ) : <EOL> """<STR_LIT>""" <EOL> name = '<STR_LIT>' <EOL> ID_KEY = '<STR_LIT:id>' <EOL> AUTHORIZATION_URL = '<STR_LIT>' <EOL> ACCESS_TOKEN_URL = '<STR_LIT>' <EOL> ACCESS_TOKEN_METHOD = '<STR_LIT:POST>' <EOL> REQUIRES_EMAIL_VALIDATION = False <EOL> EXTRA_DATA = [ <EOL> ( '<STR_LIT:id>' , '<STR_LIT:id>' ) , <EOL> ] <EOL> def get_user_details ( self , response ) : <EOL> """<STR_LIT>""" <EOL> fullname , first_name , last_name = self . get_user_names ( <EOL> first_name = response . get ( '<STR_LIT>' ) , <EOL> last_name = response . get ( '<STR_LIT>' ) <EOL> ) <EOL> return { '<STR_LIT:username>' : response . get ( '<STR_LIT>' ) , <EOL> '<STR_LIT:email>' : response . get ( '<STR_LIT:email>' ) or '<STR_LIT>' , <EOL> '<STR_LIT>' : fullname , <EOL> '<STR_LIT>' : first_name , <EOL> '<STR_LIT>' : last_name } <EOL> def user_data ( self , access_token , * args , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> return self . get_json ( <EOL> '<STR_LIT>' , <EOL> params = { '<STR_LIT>' : access_token } <EOL> ) </s>
