ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

class documentation

Keep web login and registration routes restricted to guests.

Authenticated browsers are sent to the page declared in auth.session.home. Subclasses pin a different destination by overriding the redirect_to class attribute.

Method __init__ Initialise the middleware with its collaborators.
Async Method handle Continue for guests and reject authenticated access to guest routes.
Class Variable __slots__ Undocumented
Class Variable redirect_to Undocumented
Instance Variable _home Undocumented

Inherited from ResolveIdentityMiddleware:

Async Method _establish Resolve the identity and bind the resulting context.
Class Variable guard Undocumented
Instance Variable _manager Undocumented
Instance Variable _permissions Undocumented
def __init__(self, app: IApplication, manager: IAuthManager, permissions: IPermissionRepository): (source)

Initialise the middleware with its collaborators.

Parameters
app:IApplicationApplication exposing the auth.session configuration.
manager:IAuthManagerManager exposing the configured guards.
permissions:IPermissionRepositorySource the authorization snapshot is built from.
Returns
NoneThe redirect target is resolved once, at boot time.
async def handle(self, request: Request, call_next: NextCallable) -> Response: (source)

Continue for guests and reject authenticated access to guest routes.

Parameters
request:RequestIncoming request.
call_next:NextCallableRemaining route pipeline.
Returns
ResponseGuest response or a browser redirect to the home page.
Raises
AuthorizationExceptionIf an authenticated JSON or AJAX client accesses a guest-only route.
redirect_to: ClassVar[str | None] = (source)

Undocumented

Undocumented