#NEWLINE# def test_faulty_idtoken_from_accesstoken_endpoint( self ) : #NEWLINE# #INDENT# mfos = MITMServer ( 'http://localhost:8088' ) #NEWLINE# mfos . keyjar = SRVKEYS #NEWLINE# self . consumer . http_request = mfos . http_request #NEWLINE# _state = 'state0' #NEWLINE# self . consumer . consumer_config [ 'response_type' ] = [ 'id_token' ] #NEWLINE# args = { #NEWLINE# #INDENT# 'client_id' : self . consumer . client_id , #NEWLINE# 'response_type' : result . consumer . consumer_config [ 'response_type' ] , #NEWLINE# 'scope' : [ 'openid' ] , #NEWLINE# #UNINDENT# } #NEWLINE# result = self . consumer . do_authorization_request ( state = _state , request_args = args ) #NEWLINE# self . consumer . _backup ( 'state0' ) #NEWLINE# assert ( result . status_code == 302 ) #NEWLINE# query = urlparse ( result . headers [ 'location' ] ) . query #NEWLINE# with pytest . raises ( BadSignature ) : #NEWLINE# #INDENT# self . consumer . parse_authz ( query = query )