#NEWLINE# def decode( self , jwt , key = '' , verify = True , algorithms = None , options = None , **kwargs ) : #NEWLINE# #INDENT# ( payload , signing_input , header , signature ) = self . _load ( jwt ) #NEWLINE# decoded = super ( PyJWT , self ) . decode ( jwt , key , verify , algorithms , options , ** kwargs ) #NEWLINE# try : #NEWLINE# #INDENT# payload = json . loads ( decoded . decode ( 'utf-8' ) ) #NEWLINE# #UNINDENT# except ValueError as e : #NEWLINE# #INDENT# raise DecodeError ( ( 'Invalid payload string: %s' % e ) ) #NEWLINE# #UNINDENT# if ( not isinstance ( payload , Mapping ) ) : #NEWLINE# #INDENT# raise DecodeError ( 'Invalid payload string: must be a json object' ) #NEWLINE# #UNINDENT# if verify : #NEWLINE# #INDENT# merged_options = merge_dict ( self . options , options ) #NEWLINE# self . _validate_claims ( payload , merged_options , ** kwargs ) #NEWLINE# #UNINDENT# return payload