package templates // SignupForm carries the submitted field values back to the template so // the email field can be repopulated on validation failure. // Password is intentionally never echoed back to the client (T-2-01, D-25). type SignupForm struct { Email string Password string // held here only for length validation; never passed to templates } // SignupErrors holds per-field and general error messages for the signup form. // A field with an empty string means "no error for this field". type SignupErrors struct { Email string Password string General string } // LoginForm carries the submitted email value back to the template so the // email field can be repopulated on validation failure. // Password is intentionally never echoed back to the client (T-2-21, D-25). type LoginForm struct { Email string } // LoginErrors holds per-field and general error messages for the login form. // A field with an empty string means "no error for this field". // Note: the general error for credential failures uses the intentionally generic // string "Invalid email or password" to prevent user enumeration (D-20). type LoginErrors struct { Email string Password string General string }