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 IIdentityProvider(ABC): (source)

View In Hierarchy

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 retrieveByCredentials Retrieve an identity matching the non secret credentials.
Async Method retrieveById Retrieve an identity by its unique identifier.
Async Method updateRememberToken Optionally compare and replace a persistent credential atomically.
Async Method validateCredentials Verify credentials without blocking the event loop.
Class Variable __slots__ Declare that this class introduces no additional instance slots.
@abstractmethod
async def retrieveByCredentials(self, credentials: 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 | NoneMatching identity, or None when no identity matches.
@abstractmethod
async def retrieveById(self, identifier: object) -> IAuthenticatable | None: (source)

Retrieve an identity by its unique identifier.

Parameters
identifier:objectValue previously returned by getAuthIdentifier().
Returns
orionis.auth.contracts.IAuthenticatable | NoneMatching identity, or None when it no longer exists.
async def updateRememberToken(self, identity: 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.IAuthenticatableIdentity whose stored persistent credential may be changed.
expected:str | NoneStored token expected by the compare-and-replace operation.
token:str | NoneReplacement token, or None to revoke the stored credential.
Returns
boolFalse when the provider does not implement persistent login support.
@abstractmethod
async def validateCredentials(self, identity: IAuthenticatable | None, credentials: Mapping[str, object]) -> bool: (source)

Verify credentials without blocking the event loop.

Parameters
identity:orionis.auth.contracts.IAuthenticatable | NoneIdentity whose stored password should be checked.
credentials:collections.abc.Mapping[str, object]Submitted credentials.
Returns
boolTrue only when the credentials match the stored password.
__slots__: tuple = (source)

Declare that this class introduces no additional instance slots.