<s> """<STR_LIT>""" <EOL> from social . backends . oauth import BaseOAuth2 <EOL> class BehanceOAuth2 ( BaseOAuth2 ) : <EOL> """<STR_LIT>""" <EOL> name = '<STR_LIT>' <EOL> AUTHORIZATION_URL = '<STR_LIT>' <EOL> ACCESS_TOKEN_URL = '<STR_LIT>' <EOL> ACCESS_TOKEN_METHOD = '<STR_LIT:POST>' <EOL> SCOPE_SEPARATOR = '<STR_LIT:|>' <EOL> EXTRA_DATA = [ ( '<STR_LIT:username>' , '<STR_LIT:username>' ) ] <EOL> REDIRECT_STATE = False <EOL> def get_user_id ( self , details , response ) : <EOL> return response [ '<STR_LIT:user>' ] [ '<STR_LIT:id>' ] <EOL> def get_user_details ( self , response ) : <EOL> """<STR_LIT>""" <EOL> user = response [ '<STR_LIT:user>' ] <EOL> fullname , first_name , last_name = self . get_user_names ( <EOL> user [ '<STR_LIT>' ] , user [ '<STR_LIT>' ] , user [ '<STR_LIT>' ] <EOL> ) <EOL> return { '<STR_LIT:username>' : user [ '<STR_LIT:username>' ] , <EOL> '<STR_LIT>' : fullname , <EOL> '<STR_LIT>' : first_name , <EOL> '<STR_LIT>' : last_name , <EOL> '<STR_LIT:email>' : '<STR_LIT>' } <EOL> def extra_data ( self , user , uid , response , details = None , * args , ** kwargs ) : <EOL> data = response . copy ( ) <EOL> data . update ( response [ '<STR_LIT:user>' ] ) <EOL> return super ( BehanceOAuth2 , self ) . extra_data ( user , uid , data , details , <EOL> * args , ** kwargs ) </s>
