Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vonage-jwt

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vonage-jwt

Tooling for working with JWTs for Vonage APIs in Python.

  • 1.1.5
  • PyPI
  • Socket score

Maintainers
1

Vonage JWT Generator for Python

This package (vonage-jwt) provides functionality to generate a JWT in Python code.

It is used by the Vonage Python SDK, specifically by the vonage-http-client package, to generate JWTs for authentication. Thus, it doesn't require manual installation or configuration unless you're using this package independently of an SDK.

For full API documentation, refer to the Vonage developer documentation.

Installation

Install from the Python Package Index with pip:

pip install vonage-jwt

Generating JWTs

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 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)

Verifying a JWT signature

You can use the verify_jwt.verify_signature method to verify a JWT signature is valid.

from vonage_jwt import verify_signature

verify_signature(TOKEN, SIGNATURE_SECRET) # Returns a boolean

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc