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

class ISessionGuard(IGuard): (source)

View In Hierarchy

Define the stateful operations supported by session authentication.

Async Method attempt Validate credentials and start an authenticated session.
Method login Persist an identity in the session of the current request.
Async Method logout Drop the authenticated state from the session.
Class Variable __slots__ Declare that this class introduces no additional instance slots.

Inherited from IGuard:

Async Method resolve Resolve the identity backing the incoming request.
Property name Return the configuration name of this guard.
@abstractmethod
async def attempt(self, request: _http.Request, credentials: Mapping[str, object], *, remember: bool = False) -> IAuthenticatable | None: (source)

Validate credentials and start an authenticated session.

Parameters
request:orionis.http.RequestIncoming HTTP request owning the session.
credentials:collections.abc.Mapping[str, object]Submitted credentials, typically the username and password.
remember:bool, optionalIssue a persistent login credential after verifying the password.
Returns
orionis.auth.contracts.IAuthenticatable | NoneAuthenticated identity, or None when the credentials do not match any identity.
@abstractmethod
def login(self, request: _http.Request, identity: IAuthenticatable): (source)

Persist an identity in the session of the current request.

The session identifier is rotated to close any session fixation window opened before the login.

Parameters
request:orionis.http.RequestIncoming HTTP request owning the session.
identity:orionis.auth.contracts.IAuthenticatableIdentity to remember for subsequent requests.
Returns
NoneNo return value.
@abstractmethod
async def logout(self, request: _http.Request): (source)

Drop the authenticated state from the session.

Parameters
request:orionis.http.RequestIncoming HTTP request owning the session.
Returns
NoneNo return value.
__slots__: tuple = (source)

Declare that this class introduces no additional instance slots.