#NEWLINE# def code_token_response( **kwargs ) : #NEWLINE# #INDENT# _areq = kwargs [ 'areq' ] #NEWLINE# _scode = kwargs [ 'scode' ] #NEWLINE# _sdb = kwargs [ 'sdb' ] #NEWLINE# aresp = AuthorizationResponse ( ) #NEWLINE# for key in [ 'state' , 'nonce' , 'scope' ] : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# aresp [ key ] = _areq [ key ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# aresp [ 'code' ] = _scode #NEWLINE# _dic = _sdb . upgrade_to_token ( _scode , issue_refresh = False ) #NEWLINE# for prop in AccessTokenResponse . c_param . keys ( ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# aresp [ prop ] = _dic [ prop ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# return key