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 ProfileController(BaseController): (source)

View In Hierarchy

Handle built-in profile and password-management endpoints.

Async Method changePassword Verify the current secret, save a hash and rotate the active session.
Async Method index Render the profile page with the authenticated account data.
async def changePassword(self, payload: ChangePasswordSchema, auth: IAuthManager, identities: IIdentityProvider, hashing: IHashManager) -> RedirectResponse: (source)

Verify the current secret, save a hash and rotate the active session.

Credential verification uses the same provider as login. Hashing runs off the event loop; submitted passwords are never flashed or logged. Only the identity established by authentication middleware is updated.

Parameters
payload:orionis.http.default.schemas.change_password.ChangePasswordSchemaValidated payload; invalid submissions never reach this method.
auth:orionis.auth.contracts.IAuthManagerAuthentication service owning the identity of the current request.
identities:orionis.auth.contracts.IIdentityProviderIdentity provider used to verify the submitted current password.
hashing:orionis.hashing.contracts.IHashManagerHash manager used to derive the stored password hash.
Returns
orionis.http.RedirectResponseRedirect back to the profile page, carrying either a field error or a success message.
async def index(self, auth: IAuthManager) -> HTMLResponse: (source)

Render the profile page with the authenticated account data.

Parameters
auth:orionis.auth.contracts.IAuthManagerAuthentication service holding the identity resolved for the current request.
Returns
orionis.http.HTMLResponseRendered profile page exposing only public account attributes.