using Statum; using Spry; namespace {{NS}} { public class LoginPagePublic : Object { public Statum.Model.ActionDto login { get; set; } } /** * Entrypoint for /login: hydrates the page slot with the login action * reference; already-authenticated visitors bounce home. */ public class LoginEntrypoint : StatumEntrypoint { public override async DirectiveBuilder handle() throws GLib.Error { if (!SpryAuth.current(request).is_anonymous) { return directives().navigate("/"); } var page = new LoginPagePublic(); page.login = action_registry.author(); return directives().set_typed("page", Scope.PAGE, page); } } }