Skip to content

Commit 8584489

Browse files
authored
Sem-Ver: bugfix Fix the spelling of the duplicate jti exception (rename JtiUniqunessException to JtiUniquenessException).
Signed-off-by: David Black <[email protected]>
1 parent 2644b07 commit 8584489

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

atlassian_jwt_auth/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class KeyIdentifierException(ASAPAuthenticationException):
5353
"""Raise when there are issues validating the key identifier"""
5454

5555

56-
class JtiUniqunessException(ASAPAuthenticationException):
56+
class JtiUniquenessException(ASAPAuthenticationException):
5757
"""Raise when a JTI is seen more than once. """
5858

5959

atlassian_jwt_auth/tests/test_verifier.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,9 @@ def test_verify_jwt_with_jwt_with_already_seen_jti(self):
9999
self.assertIsNotNone(verifier.verify_jwt(
100100
a_jwt,
101101
self._example_aud))
102-
for exception in [ValueError,
103-
atlassian_jwt_auth.exceptions.JtiUniqunessException]:
102+
for exception in [
103+
ValueError,
104+
atlassian_jwt_auth.exceptions.JtiUniquenessException]:
104105
with self.assertRaisesRegexp(exception, 'has already been used'):
105106
verifier.verify_jwt(a_jwt, self._example_aud)
106107

atlassian_jwt_auth/verifier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def _decode_jwt(self, a_jwt, key_identifier, jwt_key,
8080
def _check_jti(self, jti):
8181
"""Checks that the given jti has not been already been used."""
8282
if jti in self._seen_jti:
83-
raise exceptions.JtiUniqunessException(
83+
raise exceptions.JtiUniquenessException(
8484
"The jti, '%s', has already been used." % jti)
8585
self._seen_jti[jti] = None
8686
while len(self._seen_jti) > 1000:

0 commit comments

Comments
 (0)