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
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__ |
Undocumented |
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: Request, credentials: Mapping[ str, object], *, remember: bool = False) -> IAuthenticatable | None:
(source)
¶
Validate credentials and start an authenticated session.
| Parameters | |
request:Request | Incoming HTTP request owning the session. |
credentials:Mapping[str, object] | Submitted credentials, typically the username and password. |
remember:bool, optional | Issue a persistent login credential after verifying the password. |
| Returns | |
IAuthenticatable | None | Authenticated identity, or None when the credentials do not match any identity. |
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:Request | Incoming HTTP request owning the session. |
identity:IAuthenticatable | Identity to remember for subsequent requests. |
| Returns | |
None | The session is mutated as a side effect. |