New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jwt-signature-validator

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jwt-signature-validator

An ASGI Middleware to get payload from JWTs

  • 0.0.5
  • Source
  • PyPI
  • Socket score

Maintainers
1

JWT Signature Validator

Latest Commit
Package version

JWT Signature Middleware is a pure ASGI Middleware that can be used with AGSI frameworks like FastAPI, Starlette and Sanic.

Installation

pip install jwt-signature-validator

Usage

from fastapi import FastAPI
from jwt_signature_validator import EncodedPayloadSignatureMiddleware
from pydantic import BaseModel

app = FastAPI()

app.add_middleware(
    EncodedPayloadSignatureMiddleware,
    jwt_secret="hello",
    jwt_algorithms=["HS256"],
    protect_hosts=["*"]
)


class Model(BaseModel):
    text: str


@app.post("/")
def check(req: Model):
    return req

License

This project is licensed under the terms of the MIT license.

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