Skip to main content

Crossauth.js

Crossauth is a package for authentication and authorization using username/password, LDAP and OAuth2. It has two components, each can be used without the other: server for the backend and client for the frontend. It is still under development and currently only the OAuth client part is implemented. Enough of the session manager exists to support the OAuth client, but without user login functionality (ie just anonymous sessions).

There is also a Typescript package at https://github.com/mbakereth/crossauthjs that provides identical functionality, plus frontend Javascript..

The intention is to make this Python version as fully-featured as the Typescript version. However, currently only the OAuth client and resource server functionality exist.

It is also intended to support multiple web frameworks. Currently only FastAPI is supported.

Package structure

Unlike the Typescript version, there is only one package here: pycrossauth. Within this, however, are several modules:

crossauth_backend

Web framework-independent code for the backend server.

crossauth_fastapi

FastAPI version of crossauth, making use of crossauth_backend.

Package dependencies

This package intends to be flexible regarding other packages that need to be present. As well as choosing between two popular web frameworks, you can choose between several database management systems

  • Postgres
  • Sqlite
  • Prisma

Using this package

Pycrossuth is in PYPI. To use it,

pip install pycrossauth

Building this package

If you want to build Crossauth from source, clone it from https://github.com/mbakereth/pycrossauth, install create and activate a virtual environment, then do the following from the top-level directory in the repo:

pip install -r requirements.txt
pip install -r requirements-optional.txt
pip install -r requirements-dev-txt
bash build.sh

The Examples

The examples directory contains a number of examples to get you going.

They require an OAuth server to be running. Easiest way is to clone the Typescript version, https://github.com/mbakereth/crossauthjs, and run the Sveltekit OAuth server example from there.

fastapiclient

An example of an OAuth client - requesting an access token

fastapiresserver

An exsample of an OAuth reserver server - validating an access token and providing an API endpoint.

Metadata

Release files for pycrossauth 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycrossauth 1.2.2
File Size Uploaded Provenance Actions
pycrossauth-1.2.2.tar.gz 164.3 kB Without provenance Details for pycrossauth-1.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pycrossauth 1.2.2
File Interpreter ABI Platform Actions
pycrossauth-1.2.2-py3-none-any.whl Python 3 none any Details for pycrossauth-1.2.2-py3-none-any.whl

Total release size: 355.2 kB

Release files / pycrossauth-1.2.2.tar.gz

Download URL pycrossauth-1.2.2.tar.gz
Size 164.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ea6f13173b6b9348c90f4967ddde26af2960425d1016975e875491a6dbf84ac6
BLAKE2b-256 checksum
How to use checksums
39d8ba22dba08f94334d0a75c799b6dfd2efeccf827d010f3738638b6e1219fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / pycrossauth-1.2.2-py3-none-any.whl

Download URL pycrossauth-1.2.2-py3-none-any.whl
Size 190.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b4af07c3a7d15f4fa1de218c3b3bd7ad66642cc3ad783050aa726cd8194e6461
BLAKE2b-256 checksum
How to use checksums
c582c0c4587a416e86b89e5be9eca135a4de020157b9cfbe370b0b73e97bbcab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for pycrossauth 1.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page