Skip to content

Commit 9184da8

Browse files
Bese PersonalBese Personal
authored andcommitted
Fixing small typos
1 parent ccd8fad commit 9184da8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

jose/jwk.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def get_key(algorithm):
3636

3737
def register_key(algorithm, key_class):
3838
if not issubclass(key_class, Key):
39-
raise TypeError("Key class not a subclass of jwk.Key")
39+
raise TypeError("Key class is not a subclass of jwk.Key")
4040
ALGORITHMS.KEYS[algorithm] = key_class
4141
ALGORITHMS.SUPPORTED.add(algorithm)
4242
return True
@@ -53,11 +53,11 @@ def construct(key_data, algorithm=None):
5353
algorithm = key_data.get('alg', None)
5454

5555
if not algorithm:
56-
raise JWKError('Unable to find a algorithm for key: %s' % key_data)
56+
raise JWKError('Unable to find an algorithm for key: %s' % key_data)
5757

5858
key_class = get_key(algorithm)
5959
if not key_class:
60-
raise JWKError('Unable to find a algorithm for key: %s' % key_data)
60+
raise JWKError('Unable to find an algorithm for key: %s' % key_data)
6161
return key_class(key_data, algorithm)
6262

6363

@@ -119,7 +119,7 @@ def __init__(self, key, algorithm):
119119

120120
def _process_jwk(self, jwk_dict):
121121
if not jwk_dict.get('kty') == 'oct':
122-
raise JWKError("Incorrect key type. Expected: 'oct', Recieved: %s" % jwk_dict.get('kty'))
122+
raise JWKError("Incorrect key type. Expected: 'oct', Received: %s" % jwk_dict.get('kty'))
123123

124124
k = jwk_dict.get('k')
125125
k = k.encode('utf-8')

0 commit comments

Comments
 (0)