Function Web.postLogin

POST "/login", auth'd user, redirects to GET "/" on success or GET "/login" on failure

void postLogin (
  vibe.web.validation.ValidEmail email,
  vibe.web.validation.ValidPassword password
);

This is a child to the index route "/" and handles the submitted login form. The submitted data is checked to be valid, and the user is pulled from the db. If user doesn't exist, or password is incorrect user is redirected to GET "/login" with an error message. Else user details are stored for this session and user is redirected to GET "/".

Parameters

NameDescription
email field passed in via form
password field passed in via form