Skip to content

rn-forge-auth

rn-forge-auth holds authentication and authorization primitives, built on rn-forge-web: the identity, account-resolution and authorization-context contracts, Principal and Requirement, the Authenticator and Authorizer contracts, session, transaction and replay stores, the login flow and its OIDC, OAuth 2.0, password and development providers, and the OIDC token profiles.

The base install gives the core, rn_forge.auth. The oidc extra adds pyjwt[crypto], authlib, joserfc and requests for the adapter, rn_forge.auth.oidc, and for the fake provider in rn_forge.auth.testing; the redis extra adds redis for rn_forge.auth.redis. The core imports none of them.

Install

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

Drop the extras you do not use. Start from the minimum example. An authenticator raises AuthenticationFailed (401) and ScopeAuthorizer raises PermissionDenied (403); see Authenticators and authorizers.

Where to start