Skip to main content

rn-forge-auth

Documentation · Changelog · Source · All pykit packages

Authentication and authorization primitives for Python programming, built on rn-forge-web. The base install carries no third-party dependencies.

Install

dependencies = ["rn-forge-auth>=0.1,<0.2"]

The oidc extra adds pyjwt[crypto], authlib, joserfc and requests; the redis extra adds redis. The table below names the module each enables.

Minimum example

from rn_forge.auth import Principal, Requirement, ScopeAuthorizer

caller = Principal(subject="u-1", scopes=frozenset({"orders:read"}))
requirement = Requirement(any_scope=frozenset({"orders:read", "orders:admin"}))
ScopeAuthorizer().authorize(caller, requires=requirement)

Errors

An Authenticator raises rn_forge.web.AuthenticationFailed (401) and ScopeAuthorizer.authorize raises rn_forge.web.PermissionDenied (403). link_bearer_principal raises PrincipalLinkError. Importing rn_forge.auth.oidc or rn_forge.auth.redis without its extra raises ModuleNotFoundError (jwt, redis).

Module Extra Holds
rn_forge.auth none The core: the identity, account-resolution and authorization-context contracts, Principal, Requirement, Authenticator, AsyncAuthenticator, Authorizer, ScopeAuthorizer, principal_from_claims, permissions and the scope limit, AuthorizationContextCache, ResourcePolicy, the transaction, session and replay stores (in memory), validate_return_to, SessionBody, LoginFlow with LoginFailed and LoginRequest, and the local login providers of rn_forge.auth.local (PasswordIdentityProvider, DevelopmentIdentityProvider). The facade re-exports the core only.
rn_forge.auth.oidc oidc (pyjwt[crypto], authlib, joserfc, requests) OidcProvider (OIDC and OAuth 2.0 login, with RP-initiated logout), BackchannelLogout, OidcAuthenticator and the access-token, ID-token and logout-token verifiers (JwtVerifier, IdTokenVerifier, LogoutTokenVerifier). The core never imports it; .importlinter proves that.
rn_forge.auth.redis redis RedisTransactionStore, RedisSessionStore, RedisReplayStore and RedisAuthorizationVersions. The core never imports it either.
rn_forge.auth.testing oidc FakeOidcProvider and Faults, an offline OIDC provider for tests. The core never imports it.

Start with the guides.

Metadata

Release files for rn-forge-auth 0.2.0

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

Source distribution (sdist)

Source distribution for rn-forge-auth 0.2.0
File Size Uploaded Provenance Actions
rn_forge_auth-0.2.0.tar.gz 46.4 kB With provenance Details for rn_forge_auth-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rn-forge-auth 0.2.0
File Interpreter ABI Platform Actions
rn_forge_auth-0.2.0-py3-none-any.whl Python 3 none any Details for rn_forge_auth-0.2.0-py3-none-any.whl

Total release size: 101.6 kB

Release files / rn_forge_auth-0.2.0.tar.gz

Download URL rn_forge_auth-0.2.0.tar.gz
Size 46.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4894474dbb313b4c7343c07a9463bca42a397afba707630556b3b361d6ffedf1
BLAKE2b-256 checksum
How to use checksums
b9ad1e0e7740d7897b905072a5513f44588eb7e16ee8d0a462ad26cd707a607b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / rn_forge_auth-0.2.0-py3-none-any.whl

Download URL rn_forge_auth-0.2.0-py3-none-any.whl
Size 55.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
22535547dc3691997c90b7b41ce73042d599e655fe634f67a50a24d00eeada78
BLAKE2b-256 checksum
How to use checksums
ced84ff3229191378d6d159e5e47ac362b1e60e372d6ab2e079958811eeb9a72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for rn-forge-auth 0.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for rn_forge_auth-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

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