@@ -86,13 +86,13 @@ def test_fails_with_none_algorithm(self):
8686 verifier = SymmetricSignatureVerifier ("some secret" )
8787 with self .assertRaises (Exception ) as err :
8888 verifier .verify_signature (jwt )
89- self .assertEqual (str (err .exception ), 'Signature algorithm of "none" is not supported. Expected the ID token to be signed with "HS256"' )
89+ self .assertEqual (str (err .exception ), 'Signature algorithm of "none" is not supported. Expected the token to be signed with "HS256"' )
9090
9191 verifier = AsymmetricSignatureVerifier ("some url" )
9292 with self .assertRaises (Exception ) as err :
9393 verifier .verify_signature (jwt )
9494 self .assertEqual (str (err .exception ),
95- 'Signature algorithm of "none" is not supported. Expected the ID token to be signed with "RS256"' )
95+ 'Signature algorithm of "none" is not supported. Expected the token to be signed with "RS256"' )
9696
9797
9898class TestJwksFetcher (unittest .TestCase ):
@@ -249,11 +249,11 @@ def test_err_token_empty(self):
249249
250250 def test_err_token_format_invalid (self ):
251251 token = "a.b"
252- self .assert_fails_with_error (token , "ID token could not be decoded." )
252+ self .assert_fails_with_error (token , "token could not be decoded." )
253253 token = "a.b."
254- self .assert_fails_with_error (token , "ID token could not be decoded." )
254+ self .assert_fails_with_error (token , "token could not be decoded." )
255255 token = "a.b.c.d"
256- self .assert_fails_with_error (token , "ID token could not be decoded." )
256+ self .assert_fails_with_error (token , "token could not be decoded." )
257257
258258 def test_HS256_token_signature_passes (self ):
259259 token = "eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Rva2Vucy10ZXN0LmF1dGgwLmNvbS8iLCJzdWIiOiJhdXRoMHwxMjM0NTY3ODkiLCJhdWQiOlsidG9rZW5zLXRlc3QtMTIzIiwiZXh0ZXJuYWwtdGVzdC05OTkiXSwiZXhwIjoxNTg3NzY1MzYxLCJpYXQiOjE1ODc1OTI1NjEsIm5vbmNlIjoiYTFiMmMzZDRlNSIsImF6cCI6InRva2Vucy10ZXN0LTEyMyIsImF1dGhfdGltZSI6MTU4NzY3ODk2MX0.Hn38QVtN_mWN0c-jOa-Fqq69kXpbBp0THsvE-CQ47Ps"
@@ -293,7 +293,7 @@ def test_RS256_token_signature_fails(self):
293293
294294 def test_fails_with_algorithm_not_supported (self ):
295295 token = "eyJhbGciOiJub25lIn0.eyJpc3MiOiJodHRwczovL3Rva2Vucy10ZXN0LmF1dGgwLmNvbS8iLCJzdWIiOiJhdXRoMHwxMjM0NTY3ODkiLCJhdWQiOlsidG9rZW5zLXRlc3QtMTIzIiwiZXh0ZXJuYWwtdGVzdC05OTkiXSwiZXhwIjoxNTg3NzY1MzYxLCJpYXQiOjE1ODc1OTI1NjEsIm5vbmNlIjoiYTFiMmMzZDRlNSIsImF6cCI6InRva2Vucy10ZXN0LTEyMyIsImF1dGhfdGltZSI6MTU4NzY3ODk2MX0."
296- self .assert_fails_with_error (token , 'Signature algorithm of "none" is not supported. Expected the ID token to be signed with "RS256"' )
296+ self .assert_fails_with_error (token , 'Signature algorithm of "none" is not supported. Expected the token to be signed with "RS256"' )
297297 return
298298
299299 def test_fails_with_iss_missing (self ):
0 commit comments