@@ -86,13 +86,13 @@ def test_fails_with_none_algorithm(self):
86
86
verifier = SymmetricSignatureVerifier ("some secret" )
87
87
with self .assertRaises (Exception ) as err :
88
88
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"' )
90
90
91
91
verifier = AsymmetricSignatureVerifier ("some url" )
92
92
with self .assertRaises (Exception ) as err :
93
93
verifier .verify_signature (jwt )
94
94
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"' )
96
96
97
97
98
98
class TestJwksFetcher (unittest .TestCase ):
@@ -249,11 +249,11 @@ def test_err_token_empty(self):
249
249
250
250
def test_err_token_format_invalid (self ):
251
251
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." )
253
253
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." )
255
255
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." )
257
257
258
258
def test_HS256_token_signature_passes (self ):
259
259
token = "eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Rva2Vucy10ZXN0LmF1dGgwLmNvbS8iLCJzdWIiOiJhdXRoMHwxMjM0NTY3ODkiLCJhdWQiOlsidG9rZW5zLXRlc3QtMTIzIiwiZXh0ZXJuYWwtdGVzdC05OTkiXSwiZXhwIjoxNTg3NzY1MzYxLCJpYXQiOjE1ODc1OTI1NjEsIm5vbmNlIjoiYTFiMmMzZDRlNSIsImF6cCI6InRva2Vucy10ZXN0LTEyMyIsImF1dGhfdGltZSI6MTU4NzY3ODk2MX0.Hn38QVtN_mWN0c-jOa-Fqq69kXpbBp0THsvE-CQ47Ps"
@@ -293,7 +293,7 @@ def test_RS256_token_signature_fails(self):
293
293
294
294
def test_fails_with_algorithm_not_supported (self ):
295
295
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"' )
297
297
return
298
298
299
299
def test_fails_with_iss_missing (self ):
0 commit comments