Skip to main content

fans656's authorization helper

Project description

Overview

Authorization server & library to ease setting up a site (so it can delegate authorization stuff out).

Includes:

  • A docker image to run an authorization server (with UI)
  • A Python library to be used in your site

Code structure

frontend/  # frontend of auth.fans656.me
fansauth/
  server/  # auth server
  lib/     # `fansauth` python library for resource server

Development

build-frontend.sh

Resource server usage

from fastapi import FastAPI
from fansauth import auth  # <--- import `auth`

app = FastAPI()
app = auth(app)  # <--- add authorization to app

@app.get('/foo')
def foo():
    return 'hello foo'

See fansauth/lib/auth.py for more detailed usage.

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

fansauth-0.1.1.tar.gz (1.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fansauth-0.1.1-py3-none-any.whl (1.4 kB view details)

Uploaded Python 3

File details

Details for the file fansauth-0.1.1.tar.gz.

File metadata

  • Download URL: fansauth-0.1.1.tar.gz
  • Upload date:
  • Size: 1.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.7

File hashes

Hashes for fansauth-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f5064f7e196de63f0dc4bc3a657577de72ecf1692259c05d8efa475d313be0a1
MD5 a51b6ec5fe2db0ce672e68e9bea72099
BLAKE2b-256 98fcbfb56157ecf7628c628d85ab930ef9fc5c2837864230c98f6a8fbeb85f7b

See more details on using hashes here.

File details

Details for the file fansauth-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fansauth-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 1.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.7

File hashes

Hashes for fansauth-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 895f36396ac1e7debf8e15d4916bcbf12b3d133f5eb964c0a93689b3d65f61e0
MD5 dc4c38abb6790f88fed8f209fcfea88f
BLAKE2b-256 b338ab794c7e44abf717f084b080e26f123660e565cf578e53f854d8b5977e2a

See more details on using hashes here.

Supported by

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