Class Web

The class which outlines the controls the web app functionality

class Web ;

This class is registered with the URLRouter as a web interface. It's scope is to create/authenticate users, allow users to create and read blogs, and for users to interact with their accounts. The following route conventions will be used:

Constructors

NameDescription
this Constructor to init members

Fields

NameTypeDescription
_accountsRepository IAccountRepository
_authdUser vibe.web.web.__T10SessionVarTS5blogd9authduser9AuthdUserVAyaa4_75736572Z.SessionVar

Methods

NameDescription
getLogin GET "/login", displays login form
getLogout GET "/logout", requires auth'd user, logs user out + terminates session and redirects to GET "/"
getTest GET "/test", requires auth'd user, displays a test page
getUserCreate GET "/user/create", displays create account form, auth'd user redirects to GET "/"
index GET "/", displays home page
postLogin POST "/login", auth'd user, redirects to GET "/" on success or GET "/login" on failure
postUserCreate POST "/user/create", validates new user details and inserts in db, redirects to GET "/" on success or to GET "/user/create" on failure
ensureUserAuthed Ensures current user is auth'd, redirects to GET "/login" on failure