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

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

Details for the file fastapi_paseto-0.7.1.tar.gz.

File metadata

  • Download URL: fastapi_paseto-0.7.1.tar.gz
  • Upload date:
  • Size: 44.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for fastapi_paseto-0.7.1.tar.gz
Algorithm Hash digest
SHA256 25984bddcd9e569663b3b1409a85244c55a81db99c6a21e698d71c41d5136ca1
MD5 28d4c0291c199c0cfe5148bd5bbcb6db
BLAKE2b-256 7a8a1426e1aadb70d10bc898d9dc414d5be797a151d38a15b4c6306c235cb699

See more details on using hashes here.

File details

Details for the file fastapi_paseto-0.7.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_paseto-0.7.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7f8a9f2dd379b03620bf76f6ac6c3265452b2a8ecde8d53b8e2a50480037476e
MD5 9f81158337202002c6692711fbcfa603
BLAKE2b-256 936085baa49cac05ebbe39e5f569f9a282f0c321274657fb87f810cf826a2df3

See more details on using hashes here.

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