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 LoginController(BaseController): (source)
Constructor: LoginController(application)
Handle the built-in sign-in and sign-out endpoints.
| Method | __init__ |
Configure the controller from the session authentication settings. |
| Async Method | index |
Return the login page response. |
| Async Method | login |
Handle the login form submission. |
| Async Method | logout |
Invalidate the current session and return to the public welcome page. |
| Constant | DEFAULT |
/login. |
| Constant | HOME |
/home. |
| Constant | LOGIN |
auth.login. |
| Constant | LOGOUT |
/. |
| Instance Variable | redirect |
Cache the destination used after a valid session login. |
Configure the controller from the session authentication settings.
Web login uses the session guard through Auth.attempt() regardless of the guard configured as the application's default.
| Parameters | |
application:orionis.IApplication | Application instance used to read the auth configuration. |
| Returns | |
None | Complete the documented operation without returning a value. |
async def login(self, request:
Request, payload: LoginSchema, auth: IAuthManager) -> HttpResponse:
(source)
¶
Handle the login form submission.
| Parameters | |
request:orionis.http.Request | Incoming HTTP request, used to read the raw submitted payload. |
payload:orionis.http.default.schemas.login.LoginSchema | Validated credentials; invalid submissions never reach this method. |
auth:orionis.auth.contracts.IAuthManager | Authentication service using the request's existing session. |
| Returns | |
orionis.http.Response | Redirect to the dashboard, or back with a generic credential error. |
Invalidate the current session and return to the public welcome page.
| Parameters | |
auth:orionis.auth.contracts.IAuthManager | Authentication service bound to the current request. |
| Returns | |
orionis.http.Response | Redirect whose session cookie is cleared by the web middleware. |