Skip to main content

FastAPI extension that provides PASETO Auth support

Project description

FastAPI PASETO Auth

Tests Coverage Status PyPI version Downloads

Documentation: https://yashram96.github.io/fastapi-paseto

Source Code: https://github.com/yashram96/fastapi-paseto


FastAPI extension that provides PASETO (Plastform-Agnostic SEcurity TOkens) Auth support
PASETO are a simpler, yet more secure alternative to JWTs.

If you were familiar with flask-jwt-extended or fastapi-jwt-auth this extension suitable for you, as this is forked from fastapi-jwt-auth which in turn used flask-jwt-extended as motivation

Features

  • Access tokens and refresh tokens
  • Freshness Tokens
  • Revoking Tokens
  • Support for adding custom claims to Tokens
  • Built-in Base64 Encoding of Tokens
  • Custom token types

Installation

The easiest way to start working with this extension with pip

pip install fastapi-paseto

Roadmap

  • Support for WebSocket authorization

FAQ

  • Where's support for tokens in cookies?
    I mostly forked fastapi-jwt-auth because I needed a library to use for authentication using PASETO tokens in my private FastAPI Application. Which is why I only kept the functionality that I personally required.
    Personally, I'm not a fan of saving data in cookies, and cookie support made up a big part of the code which just didn't make sense for me to bother adapting.
    Hence, I likely will not be implementing support for storing PASETO tokens in cookies unless there is a considerable amount of people wanting it.
    However, I will gladly accept PRs implementing tokens in cookies if someone else wants to implement it.

License

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

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

fastapi_paseto-0.7.1.tar.gz (44.0 kB view hashes)

Uploaded Source

Built Distribution

fastapi_paseto-0.7.1-py2.py3-none-any.whl (10.8 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page