Releases: hwjeremy/siwa-python
0.0.7 - Update PyJWT Dependency
Under the hood, siwa-python uses PyJWT to verify the integrity of JSON Web Tokens (JWTs) received during authentication requests. @mjamroz helpfully pointed out that siwa-python was using an outdated call to the PyJWT API, which would crash in the latest version of PyJWT, 2.2.0.
0.0.7 fixes this crash by properly calling the latest version of the PyJWT API, and assigns a formal dependency for PyJWT 2.2.0 in setup.py
.
Update to the latest version of siwa-python using Pip:
$ pip install --upgrade siwa
-- Hugh
0.0.6 - An Actually Useful Version
0.0.6 is the first version of siwa-python
to be useful in the real world. A big thanks to @kevinrenskers for pointing out that 0.0.5
was hard-coded to only support the blinkybeach.Makara
audience. Derp. Thanks to Kevin, you can now specify the audience when you call is_validly_signed
. Here's an example:
from siwa import IdentityToken
import json
# Suppose you have a file named token.json containing a SIWA token:
with open('token.json', 'r') as rfile:
json_string = json.loads(rfile.read())
token = IdentityToken.parse(data=json_string)
token_is_valid = token.is_validly_signed(
audience='blinkybeach.Makara' # Your audience here
)
print('The token is {v}'.format(
v=('valid' if token_is_valid else 'not valid')
))
You can upgrade to 0.0.6
with PyPi:
pip install --upgrade siwa
Also included in 0.0.6
is expanded documentation of all publicly available types. See the readme.md
file.
Enjoy!
-- Hugh