![]() |
zeep::http::login_controller — http controller that handles login and logout
// In header: <zeep/http/login-controller.hpp> class login_controller : public { public: // construct/copy/destruct ( = "/"); // public member functions (basic_server *); (request &, reply &); xml::document (request &) ; (request &, reply &); };
There is a html version of this controller as well, that one is a bit nicer
login_controller
public member functions(basic_server * server);bind this controller to server
Makes sure the server has a security context and adds rules to this security context to allow access to the /login page
(request & req, reply & rep);will handle the actual requests
xml::document (request & req) ;return the XHTML login form, subclasses can override this to provide custom login forms
The document returned should have input fields for 'username', 'password' and a hidden '_csrf' and 'uri' value.
The _csrf value is used to guard against CSRF attacks. The uri is the location to redirect to in case of a valid login.
(request & req, reply & reply);Create an error reply for an unauthorized access.
An error handler may call this method to create a decent login screen.
Parameters: |
|