<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from google . appengine . api import users <EOL> from social . backends . base import BaseAuth <EOL> from social . exceptions import AuthException <EOL> class GoogleAppEngineAuth ( BaseAuth ) : <EOL> """<STR_LIT>""" <EOL> name = '<STR_LIT>' <EOL> def get_user_id ( self , details , response ) : <EOL> """<STR_LIT>""" <EOL> user = users . get_current_user ( ) <EOL> if user : <EOL> return user . user_id ( ) <EOL> def get_user_details ( self , response ) : <EOL> """<STR_LIT>""" <EOL> user = users . get_current_user ( ) <EOL> return { '<STR_LIT:username>' : user . user_id ( ) , <EOL> '<STR_LIT:email>' : user . email ( ) , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' } <EOL> def auth_url ( self ) : <EOL> """<STR_LIT>""" <EOL> return users . create_login_url ( self . redirect_uri ) <EOL> def auth_complete ( self , * args , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> if not users . get_current_user ( ) : <EOL> raise AuthException ( '<STR_LIT>' ) <EOL> kwargs . update ( { '<STR_LIT>' : '<STR_LIT>' , '<STR_LIT>' : self } ) <EOL> return self . strategy . authenticate ( * args , ** kwargs ) </s>
