/* Logout service for use with httpSetAuthFormDetails. */ static void logoutServiceProc(HttpConn *conn) { HttpRoute *route; HttpAuth *auth; cchar *loggedOut; route = conn->rx->route; auth = route->auth; httpLogout(conn); loggedOut = (auth->loggedOutPage) ? auth->loggedOutPage : auth->loginPage; if (!loggedOut) { loggedOut = "/"; } httpRedirect(conn, HTTP_CODE_MOVED_TEMPORARILY, loggedOut); }
/* Logout the user and redirect to the login page */ static void logoutUser() { httpLogout(getConn()); redirect("/public/login.esp"); }
static void logoutServiceProc(HttpConn *conn) { httpLogout(conn); httpRedirect(conn, HTTP_CODE_MOVED_TEMPORARILY, conn->rx->route->auth->loginPage); }