EpochtalkServerWeb.UserController (epochtalk_server v0.1.0)

Controller For User related API requests

Link to this section Summary

Functions

Authenticates currently logged in User

Confirms a newly registered User. Used when :epochtalk_server[:frontend_config]["verify_registration"] configuration is set to true

Used to check if an email has already been taken

Logs in an existing User

Logs out the logged in User

Registers a new User

Used to check if a username has already been taken

Link to this section Functions

Link to this function

authenticate(conn, attrs)

Authenticates currently logged in User

Link to this function

confirm(conn, arg2)

Confirms a newly registered User. Used when :epochtalk_server[:frontend_config]["verify_registration"] configuration is set to true

Link to this function

email(conn, map)

Used to check if an email has already been taken

Link to this function

login(conn, attrs)

Logs in an existing User

Link to this function

logout(conn, attrs)

Logs out the logged in User

  • TODO(boka): check if user is on page that requires auth
  • TODO(boka): Delete users session
Link to this function

register(conn, attrs)

Registers a new User

Link to this function

username(conn, map)

Used to check if a username has already been taken