Open hampsterx opened 3 years ago
we have a secret key that is in bytes (not utf-8 unfortunately).
PyJWT does this..
def force_bytes(value): if isinstance(value, text_type): return value.encode('utf-8') elif isinstance(value, binary_type): return value else: raise TypeError('Expected a string value')
eg it allows to use bytes for the key.
Modifying type confirms works fine.
we have a secret key that is in bytes (not utf-8 unfortunately).
PyJWT does this..
eg it allows to use bytes for the key.
Modifying type confirms works fine.