Skip to content

Commit 77b806f

Browse files
committed
Removed api.header since it isn't used and isn't a public part of the API
1 parent 9715466 commit 77b806f

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

jwt/api.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,6 @@ def register_algorithm(alg_id, alg_obj):
3131
_register_default_algorithms()
3232

3333

34-
def header(jwt):
35-
if isinstance(jwt, text_type):
36-
jwt = jwt.encode('utf-8')
37-
header_segment = jwt.split(b'.', 1)[0]
38-
try:
39-
header_data = base64url_decode(header_segment)
40-
return json.loads(header_data.decode('utf-8'))
41-
except (ValueError, TypeError):
42-
raise DecodeError('Invalid header encoding')
43-
44-
4534
def encode(payload, key, algorithm='HS256', headers=None, json_encoder=None):
4635
segments = []
4736

0 commit comments

Comments
 (0)