#NEWLINE# def _validate_claims( self , payload , options , audience = None , issuer = None , leeway = 0 , **kwargs ) : #NEWLINE# #INDENT# if ( 'verify_expiration' in kwargs ) : #NEWLINE# #INDENT# options [ 'verify_exp' ] = kwargs . get ( 'verify_expiration' , True ) #NEWLINE# warnings . warn ( 'The verify_expiration parameter is deprecated. Please use options instead.' , DeprecationWarning ) #NEWLINE# #UNINDENT# if isinstance ( leeway , timedelta ) : #NEWLINE# #INDENT# leeway = timedelta_total_seconds ( leeway ) #NEWLINE# #UNINDENT# if ( not isinstance ( audience , ( string_types , type ( None ) ) ) ) : #NEWLINE# #INDENT# raise TypeError ( 'audience must be a string or None' ) #NEWLINE# #UNINDENT# self . _validate_required_claims ( payload , options ) #NEWLINE# now = timegm ( datetime . utcnow ( ) . utctimetuple ( ) ) #NEWLINE# if ( ( 'iat' in payload ) and options . get ( 'verify_iat' ) ) : #NEWLINE# #INDENT# self . _validate_iat ( payload , now , leeway ) #NEWLINE# #UNINDENT# if ( ( 'nbf' in payload ) and options . get ( 'verify_nbf' ) ) : #NEWLINE# #INDENT# self . _validate_nbf ( payload , audience , leeway ) #NEWLINE# #UNINDENT# if ( ( 'exp' in payload ) and options . get ( 'verify_exp' ) ) : #NEWLINE# #INDENT# self . _validate_exp ( payload , now , leeway ) #NEWLINE# #UNINDENT# if options . get ( 'verify_iss' ) : #NEWLINE# #INDENT# self . _validate_iss ( payload , issuer ) #NEWLINE# #UNINDENT# if options . get ( 'verify_aud' ) : #NEWLINE# #INDENT# self . _validate_aud ( payload , audience )