destPage = F::get("d", $page->getMainUrl()); $this->checkSession($username, $authType); if ($authType === "ext" && F::get("a")) { # autologin $extauthUrl = config::k("url")."/".$page->getExtauthUrl(); page::redirect(page::bu($extauthUrl, [ "d" => $this->destPage, ])); } } function print(AInitAuthzPage $page): void { page::no_cache(); ly::row(); vo::h1(["class" => "text-center", q($page->TITLE())]); ly::col(["sm" => 6, "sm-push" => 3]); $status = $this->getStatus(); switch ($status) { case authz::DISCONNECTED: msg::warning("Vous avez été déconnecté. Veuillez vous reconnecter"); break; case authz::UNAUTHORIZED: msg::error(["user" => [ "Connecté en tant que ", v::b($this->getAuth()), ", vous n'êtes pas autorisé à accéder à la page que vous avez demandé.", ]]); break; } ly::panel("Connexion"); fo::start([ "type" => "basic", "action" => $page->getExtauthUrl(), "method" => "get", ]); fo::hidden("d", $this->destPage); vo::p("Si vous avez un compte à l'université, vous pouvez vous connecter"); if ($this->isAuth()) { if ($status != authz::UNAUTHORIZED) { msg::warning(["user" => [ "Connecté en tant que ", v::b($this->getAuth()), ", vous n'êtes pas autorisé à accéder à cette application.", ]]); } } else { fo::submit(["Connexion", "accesskey" => "r"]); } fo::end(); ly::end(); } }