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
Resolve the identity of API requests from a personal access token.
The token travels in the standard header:
Authorization: Bearer <token>
Tokens are opaque, revocable and optionally expiring. No signed payload such as a JWT is involved, so revocation is immediate.
Concurrency
The guard is stateless and safe as a singleton. The only write it performs is the last_used_at update, issued as a single statement where the last writer legitimately wins.
| Method | __init__ |
Initialise the guard with its collaborators. |
| Async Method | resolve |
Resolve the identity owning the presented access token. |
| Class Variable | __slots__ |
Undocumented |
| Instance Variable | __identities |
Undocumented |
| Instance Variable | __tokens |
Undocumented |
| Property | name |
Return the configuration name of this guard. |
Initialise the guard with its collaborators.
| Parameters | |
tokens:IAccessTokenRepository | Store used to look tokens up and mark them as used. |
identities:IIdentityProvider | Provider turning a token owner into an identity. |
| Returns | |
None | Only the collaborators are retained. |
Resolve the identity owning the presented access token.
| Parameters | |
request:Request | Incoming HTTP request. |
| Returns | |
GuardResult | None | Resolved identity together with the abilities of the token, or None when the request carries no usable token. |