#NEWLINE# def verify_challenge( self , entity , response ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# token = response . decode ( 'utf-8' ) #NEWLINE# #UNINDENT# except ValueError as exc : #NEWLINE# #INDENT# return self . state ( False , entity , None ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# result = self . verify ( token ) #NEWLINE# if result : #NEWLINE# #INDENT# entity = ( entity or self . auth . username ( ) ) #NEWLINE# #UNINDENT# return self . state ( result , self , None ) #NEWLINE# #UNINDENT# except auth . PasswordError as exc : #NEWLINE# #INDENT# return self . state ( False , entity , None )