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.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 rn-forge-auth 0.2.2
File Size Uploaded Provenance Actions
rn_forge_auth-0.2.2.tar.gz 46.4 kB With provenance Details for rn_forge_auth-0.2.2.tar.gz

Built distribution (wheel)

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

Total release size: 101.6 kB

Release files / rn_forge_auth-0.2.2.tar.gz

Download URL rn_forge_auth-0.2.2.tar.gz
Size 46.4 kB
Tags Source
SHA-256 checksum
How to use checksums
149e868475216db9ea256509ca9ec1fdcc9588230ad0b7475c29c22b4396f9e9
BLAKE2b-256 checksum
How to use checksums
7e71a7847cad44da0a21f86fbfba41a5490f7a1f3ec5115501cac66f9ec314f8
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 24, 2026.

Transparency log

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

Download URL rn_forge_auth-0.2.2-py3-none-any.whl
Size 55.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90e8775a2227c0bd153f2dc91e7d85885146e7e637f5cd9eb0cf83cd2ee12626
BLAKE2b-256 checksum
How to use checksums
72d1dc1e454f1b49f5bfc2946cb4464289292cb1e12d68022d17bf581f5f87d9
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 24, 2026.

Transparency log

Security for rn-forge-auth 0.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.

Full provenance

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

Select from 2 files

Attestation for rn_forge_auth-0.2.2.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 24, 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