#NEWLINE# def confirm_authorization_request( self ) : #NEWLINE# #INDENT# 'When consumer confirm the authrozation.' #NEWLINE# server = self . server #NEWLINE# ( uri , http_method , body , headers ) = extract_params ( ) #NEWLINE# try : #NEWLINE# #INDENT# ( realms , credentials ) = server . get_realms_and_credentials ( uri , http_method = http_method , body = body , headers = headers ) #NEWLINE# ret = server . create_authorization_response ( server , http_method , body , headers , realms , credentials ) #NEWLINE# log . debug ( 'Authorization successful.' ) #NEWLINE# return create_response ( * ret ) #NEWLINE# #UNINDENT# except errors . OAuth1Error as e : #NEWLINE# #INDENT# return redirect ( e . in_uri ( self . error_uri ) ) #NEWLINE# #UNINDENT# except errors . InvalidClientError as e : #NEWLINE# #INDENT# return redirect ( e . in_uri ( self . error_uri ) )