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 IIdentityProvider(ABC): (source)
Define how a persisted identity becomes an application object.
Implementations decide where identities live. The rest of the module only knows this contract, so no component depends on a class named User.
| Async Method | retrieve |
Retrieve an identity matching the non secret credentials. |
| Async Method | retrieve |
Retrieve an identity by its unique identifier. |
| Async Method | update |
Optionally compare and replace a persistent credential atomically. |
| Async Method | validate |
Verify credentials without blocking the event loop. |
| Class Variable | __slots__ |
Declare that this class introduces no additional instance slots. |
Mapping[ str, object]) -> IAuthenticatable | None:
(source)
¶
Retrieve an identity matching the non secret credentials.
The password is deliberately ignored here so credential lookup and credential verification stay separate operations.
| Parameters | |
credentials:collections.abc.Mapping[str, object] | Submitted credentials. |
| Returns | |
orionis.auth.contracts.IAuthenticatable | None | Matching identity, or None when no identity matches. |
object) -> IAuthenticatable | None:
(source)
¶
Retrieve an identity by its unique identifier.
| Parameters | |
identifier:object | Value previously returned by getAuthIdentifier(). |
| Returns | |
orionis.auth.contracts.IAuthenticatable | None | Matching identity, or None when it no longer exists. |
IAuthenticatable, expected: str | None, token: str | None) -> bool:
(source)
¶
Optionally compare and replace a persistent credential atomically.
Providers supporting remember-me must also compare the current password and require an active identity when issuing a non-null token. Providers without persistent login support return False and issue no cookie.
| Parameters | |
identity:orionis.auth.contracts.IAuthenticatable | Identity whose stored persistent credential may be changed. |
expected:str | None | Stored token expected by the compare-and-replace operation. |
token:str | None | Replacement token, or None to revoke the stored credential. |
| Returns | |
bool | False when the provider does not implement persistent login support. |
IAuthenticatable | None, credentials: Mapping[ str, object]) -> bool:
(source)
¶
Verify credentials without blocking the event loop.
| Parameters | |
identity:orionis.auth.contracts.IAuthenticatable | None | Identity whose stored password should be checked. |
credentials:collections.abc.Mapping[str, object] | Submitted credentials. |
| Returns | |
bool | True only when the credentials match the stored password. |