Commit Graph

80 Commits

Author SHA1 Message Date
max
18ee7b2fac Make error message more clear 2022-11-14 12:11:10 -06:00
max
58af44bdd6 Add csrf protection functions 2022-11-14 12:03:51 -06:00
max
35f7cb7601 Make sure a duplicate session token is never stored 2022-11-06 10:50:54 -06:00
max
8f87ee1c4e Fix and add comments 2022-11-04 15:12:57 -05:00
max
2a95868d5f Log err in GetCurrentUser 2022-11-04 13:59:24 -05:00
max
bd4f9047d9 Add function to return the current user based off of the session cookie 2022-11-04 13:58:03 -05:00
Maximilian
6ddafff871 Formatting 2022-11-01 23:07:22 -05:00
Maximilian
92529640d6 Make session cookie HttpOnly and Secure 2022-11-01 17:59:18 -05:00
Maximilian
967e918df1 Properly overwrite session cookie when logging out 2022-11-01 17:31:19 -05:00
Maximilian
a6b6c259ce Proper Logout logic 2022-11-01 17:29:41 -05:00
Maximilian
2f3c12a06c Fix auth_token assignment 2022-11-01 17:28:28 -05:00
Maximilian
d68badc41c Fix password authentication 2022-11-01 17:15:19 -05:00
Maximilian
619469059c Create logs folder if it doesn't already exist 2022-11-01 16:30:54 -05:00
Maximilian
601b3d2cb0 Login function now authenticates and redirects 2022-11-01 16:14:49 -05:00
Maximilian
e6b08266ac Update dependencies 2022-11-01 15:39:30 -05:00
max
187d10ca4a Routes and show controller functions for login and logout 2022-11-01 11:23:44 -05:00
max
5a9ee796f8 Rearrange functions 2022-11-01 11:23:08 -05:00
Maximilian
200942b2a2 Set session cookie name 2022-10-22 12:23:34 -05:00
Maximilian
a590c96d0b Error handling for CreateUser query 2022-10-22 12:18:14 -05:00
max
93a1cb6049 ValidateSessionCookie() and LogoutUser() 2022-10-21 21:04:46 -05:00
max
3417622841 Pass response writer to createSessionCookie() 2022-10-21 20:17:11 -05:00
Maximilian
df8e8f0426 Formatting 2022-10-20 20:08:29 -05:00
Maximilian
3aadb40b5c Update go.mod 2022-10-20 19:52:49 -05:00
max
63a7032ebb Exclude .idea 2022-10-20 12:22:25 -05:00
max
8b07683d85 go.sum 2022-10-20 12:21:32 -05:00
max
d875d5e351 Work in progress user model and functionality 2022-10-20 11:59:57 -05:00
max
e73c006550 Routing, templating, and database handling 2022-10-20 11:59:33 -05:00
max
38352de02f Base app 2022-10-20 11:58:21 -05:00
max
31fc0856b8 Dependency injection, example .env, and config handling 2022-10-20 11:57:41 -05:00
max
dd5b381426 gitignore 2022-10-20 11:56:16 -05:00