https://github.com/robertoprevato/pythonjwtdemo
Demo for using Python to validate JWTs
https://github.com/robertoprevato/pythonjwtdemo
jwks jwt oauth
Last synced: 6 months ago
JSON representation
Demo for using Python to validate JWTs
- Host: GitHub
- URL: https://github.com/robertoprevato/pythonjwtdemo
- Owner: RobertoPrevato
- License: mit
- Created: 2018-10-27T12:56:00.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-27T13:03:39.000Z (about 7 years ago)
- Last Synced: 2025-03-30T22:32:00.675Z (10 months ago)
- Topics: jwks, jwt, oauth
- Language: Python
- Size: 39.1 KB
- Stars: 28
- Watchers: 2
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Validating JWTs with Python
This demo demonstrates how to validate JWTs using Python, obtaining RSA public keys from JWKS.
This code has been described in this blog post: [https://robertoprevato.github.io/Validating-JWT-Bearer-tokens-from-Azure-AD-in-Python/](https://robertoprevato.github.io/Validating-JWT-Bearer-tokens-from-Azure-AD-in-Python/).
**Important**: this code is just an example: it contains configuration to validate JWTs issued by Azure AD B2C, for an application configured in my test tenant.
# Install requirements
Note: `cryptography` package might require extra dependencies, please refer to its documentation to know how to install it.
# Example
```bash
python demo.py
```