#NEWLINE# def verify( self , **kwargs ) : #NEWLINE# #INDENT# super ( IdToken , self ) . verify ( ** kwargs ) #NEWLINE# if ( 'aud' in self ) : #NEWLINE# #INDENT# if ( 'client_id' in kwargs ) : #NEWLINE# #INDENT# if ( kwargs [ 'client_id' ] not in self [ 'aud' ] ) : #NEWLINE# #INDENT# raise NotForMe ( '' , self ) #NEWLINE# #UNINDENT# #UNINDENT# if ( len ( self [ 'aud' ] ) > 1 ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# assert ( 'azp' in self ) #NEWLINE# #UNINDENT# except AssertionError : #NEWLINE# #INDENT# raise VerificationError ( 'azp missing' , self ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# assert ( self [ 'azp' ] in self [ 'aud' ] ) #NEWLINE# #UNINDENT# except AssertionError : #NEWLINE# #INDENT# raise VerificationError ( 'Mismatch between azp and aud claims' , self ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if ( 'azp' in self ) : #NEWLINE# #INDENT# if ( 'client_id' in kwargs ) : #NEWLINE# #INDENT# if ( kwargs [ 'client_id' ] != self [ 'azp' ] ) : #NEWLINE# #INDENT# raise NotForMe ( '' , self ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# _now = time_util . utc_time_sans_frac ( ) #NEWLINE# try : #NEWLINE# #INDENT# _skew = kwargs [ 'skew' ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# _skew = 0 #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# _exp = self [ 'exp' ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise MissingRequiredAttribute ( 'exp' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( _now - _skew ) > _exp ) : #NEWLINE# #INDENT# raise EXPError ( 'Invalid expiration time' ) #NEWLINE# #UNINDENT# #UNINDENT# try : #NEWLINE# #INDENT# _storage_time = kwargs [ 'nonce_storage_time' ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# _storage_time = NONCE_STORAGE_TIME #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# _iat = self [ 'iat' ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise MissingRequiredAttribute ( 'iat' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( _iat + _storage_time ) < ( _now - _skew ) ) : #NEWLINE# #INDENT# raise IATError ( 'Issued too long ago' ) #NEWLINE# #UNINDENT# #UNINDENT# return True