mirror of
https://github.com/correl/openapi-core.git
synced 2024-11-28 19:19:52 +00:00
10 lines
255 B
Python
10 lines
255 B
Python
|
from base64 import urlsafe_b64decode
|
||
|
|
||
|
|
||
|
def b64decode(s):
|
||
|
# Code from
|
||
|
# https://github.com/GehirnInc/python-jwt/blob/master/jwt/utils.py#L29
|
||
|
s_bin = s.encode('ascii')
|
||
|
s_bin += b'=' * (4 - len(s_bin) % 4)
|
||
|
return urlsafe_b64decode(s_bin)
|