<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import , unicode_literals <EOL> from . base import Client <EOL> from . . parameters import prepare_grant_uri , prepare_token_request <EOL> from . . parameters import parse_authorization_code_response <EOL> from . . parameters import parse_token_response <EOL> class WebApplicationClient ( Client ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , client_id , code = None , ** kwargs ) : <EOL> super ( WebApplicationClient , self ) . __init__ ( client_id , ** kwargs ) <EOL> self . code = code <EOL> def prepare_request_uri ( self , uri , redirect_uri = None , scope = None , <EOL> state = None , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> return prepare_grant_uri ( uri , self . client_id , '<STR_LIT:code>' , <EOL> redirect_uri = redirect_uri , scope = scope , state = state , ** kwargs ) <EOL> def prepare_request_body ( self , client_id = None , code = None , body = '<STR_LIT>' , <EOL> redirect_uri = None , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> code = code or self . code <EOL> return prepare_token_request ( '<STR_LIT>' , code = code , body = body , <EOL> client_id = self . client_id , redirect_uri = redirect_uri , ** kwargs ) <EOL> def parse_request_uri_response ( self , uri , state = None ) : <EOL> """<STR_LIT>""" <EOL> response = parse_authorization_code_response ( uri , state = state ) <EOL> self . _populate_attributes ( response ) <EOL> return response </s>
