A JWT Generator for Python. Creates JWTs for use with Vonage APIs.
Project description
Vonage JWT Generator for Python
This package provides functionality to generate a JWT in Python code.
It is used by the Vonage Python SDK.
Installation
Install from the Python Package Index with pip:
pip install vonage-jwt
Usage
This JWT Generator can be used implicitly, just by using the Vonage Python SDK to make JWT-authenticated API calls.
It can also be used as a standalone JWT generator for use with Vonage APIs, like so:
Import the JwtClient
object
from vonage_jwt.jwt import JwtClient
Create a JwtClient
object
jwt_client = JwtClient(application_id, private_key)
Generate a JWT using the provided application id and private key
jwt_client.generate_application_jwt()
Optional JWT claims can be provided in a python dictionary:
claims = {'jti': 'asdfzxcv1234', 'nbf': now + 100}
jwt_client.generate_application_jwt(claims)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vonage_jwt-1.0.0.tar.gz
(7.5 kB
view hashes)
Built Distribution
Close
Hashes for vonage_jwt-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 967df0ea98e149cbba2f12dfaee1ba37fcbc7cf6f512523909b71feba1e1ff6c |
|
MD5 | 2e75f642793e0eae7cf3b8a63e77b27d |
|
BLAKE2b-256 | a28ac8a5f3a62171e24c95612d216791ade42eed27f41420f522c4938e76f5b8 |