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 IAuthenticationContext(ABC): (source)
Known subclasses: orionis.auth.context.AuthenticationContext
Define the authenticated state bound to a single request.
The context is never stored on a singleton. It lives in the container scope opened by the HTTP kernel, so two concurrent requests can never observe each other's identity.
| Async Method | authorization |
Return the effective authorization snapshot of the request. |
| Method | identifier |
Return the unique identifier of the authenticated identity. |
| Class Variable | __slots__ |
Undocumented |
| Property | abilities |
Return the abilities carried by the presented credential. |
| Property | credential |
Return the identifier of the credential that authenticated. |
| Property | guard |
Return the name of the guard that resolved the identity. |
| Property | identity |
Return the authenticated identity of the request. |
| Property | is |
Report whether the request carries an authenticated identity. |
| Property | is |
Report whether the request is anonymous. |
orionis.auth.context.AuthenticationContextReturn the effective authorization snapshot of the request.
The snapshot is built at most once and reused by every later authorization check performed during the same request.
| Returns | |
IAuthorizationSnapshot | Immutable view of the permissions, roles and abilities that apply to the current request. |
orionis.auth.context.AuthenticationContextReturn the unique identifier of the authenticated identity.
| Returns | |
object | None | Identifier of the identity, or None for a guest request. |
orionis.auth.context.AuthenticationContextReturn the identifier of the credential that authenticated.
| Returns | |
object | None | Identifier of the revocable credential, such as a personal access token, or None when the guard uses none. |
orionis.auth.context.AuthenticationContextReturn the name of the guard that resolved the identity.
| Returns | |
str | None | Guard name, or None when nobody authenticated the request. |
orionis.auth.context.AuthenticationContextReturn the authenticated identity of the request.
| Returns | |
IAuthenticatable | None | Resolved identity, or None for a guest request. |
orionis.auth.context.AuthenticationContextReport whether the request carries an authenticated identity.
| Returns | |
bool | True when an identity was resolved by a guard. |