Process login requests

process_login_post(
  req,
  res,
  user_param = "user",
  password_param = "password",
  user = Sys.getenv("AMBHTMX_USER"),
  password = Sys.getenv("AMBHTMX_PASSWORD"),
  user_error = "Invalid user",
  password_error = "Invalid password",
  cookie_loggedin = "loggedin",
  cookie_errors = "errors",
  login_url = "/login",
  success_url = "/"
)

Arguments

req

request object

res

response object

user_param

if you need to customize the name of the user parameter

password_param

if you need to customize the name of the password parameter

user

if you want to customize the required user or it uses AMBHTMX_USER

password

if you want to customize the required password or it uses AMBHTMX_PASSWORD

user_error

if you need to customize the error message for the user

password_error

if you need to customize the error message for the password

if you need to customize the name of the loggedin cookie

if you need to customize the name of the errors cookie

login_url

if you need to customize the url of the login form

success_url

if you need to customize the url of the success loggedin process

Value

the login process response