This package help to validate azure ad jwt token.
Project description
aadinspector
This package will help to validate azure b2c jwt token.
📝 Table of Contents
🧐 About
This package will help to validate azure b2c jwt token.
🏁 Getting Started
-
Dependancy & prerequisite
- Python >=3.6 should be installed.
- "cryptography==37.0.4"
- "PyJWT==2.4.0"
- "requests==2.28.1"
-
To Start experimenting this package you need to install it.
pip install aadinspector
# public key code should run only once on app start.
pub_handler= PublicKeyHandler("62105d2a-48a0-4651-8d84-5a5e197fba03")
pub_handler.set_name_of_policy("b2c_1a_giadataportal__signup_signin")
token="string"
public_key= pub_handler.get_public_key(token)
print(public_key)
# token validation code should run for each request.
jwt_validator = JWTValidator(public_key)
is_valid, token = jwt_validator.validate(token)
print(is_valid)
print(token)
✍️ Authors
- Dinesh Kushwaha - Idea & Initial work
See also the list of contributors who participated in this project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aadinspector-1.0.0.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for aadinspector-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17f66a9f63c757b72ae2dc2e32ad39e303325228a570ac32fac2863fcfc755ba |
|
MD5 | e9da2388177ab6fd548a983169c13239 |
|
BLAKE2b-256 | 971405be9e44a1bf15853aac3fcd8fd833b6d904fd2f9c195ab5c16ec26411f7 |