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__ Undocumented
@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:Mapping[str, object]Submitted credentials.
Returns
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
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:IAuthenticatableValue supplied for identity.
expected:str | NoneValue supplied for expected.
token:str | NoneValue supplied for token.
Returns
boolResult of the operation described above.
@abstractmethod
async def validateCredentials(self, identity: IAuthenticatable | None, credentials: Mapping[str, object]) -> bool: (source)

Verify credentials without blocking the event loop.

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

Undocumented