Commit Graph

64 Commits

Author SHA1 Message Date
8fa57eddb1 feat: implemented PasswordResetBegin method in auth service with cooldown for each email being stored in redis 2025-07-12 19:32:53 +03:00
b91ff2c802 refactor: added redisclient connection error check 2025-07-12 17:04:09 +03:00
541847221b chore: tidy swagger comments;
feat: password reset models;
feat: verification code validator
2025-07-11 17:44:48 +03:00
c988a16783 refactor: removed error logs from smtp service since they are redundant 2025-07-10 12:21:23 +03:00
f59b647b27 feat: development compose file;
fix: smtp service
2025-07-10 01:51:48 +03:00
15c140db31 feat: implemented smtp service;
feat: implemented registration emails;
fix: config variables for password length used the same env variable;
refactor: all available config variables added to docker-compose.yml
2025-07-09 23:26:30 +03:00
63b63038d1 feat: initialized smtp service;
refactor: config now returns a copy of a struct to prevent editing;
chore: corrected identation
2025-07-08 23:21:00 +03:00
b5fdcd5dca feat: smtp config;
chore: added license comment blocks to the rest of backend and to sqlc schema & queries
2025-07-07 01:31:21 +03:00
72a512bb4f feat: automatic termination of older sessions on login (temporary until release 4);
fix: login controller method not returning tokens
2025-07-06 14:45:36 +03:00
8588a17928 chore: updated docs 2025-07-06 14:03:55 +03:00
bc9f5c6d3c fix: unique user id in user session;
feat: login controller method;
fix: name validation hander
2025-07-06 14:00:59 +03:00
333817c9e1 refactor: moved hashing logic into application layer for security;
fix: error handling in auth service for database;
refactor: removed redundant taken email check;
chore: removed todos that were completed/not needed;
fix: leaking transactions in complete registration and login on error;
refactor: got rid of txless requests during transactions;
2025-07-06 13:01:08 +03:00
5e32c3cbd3 refactor: password requirements variables;
refactor: password validation function moved to custom validators;
refactor: adjusted model's validation fields
2025-07-05 17:50:01 +03:00
8319afc7ea refactor/fix: now using pgx errors for postgres error checking instead of trying to look up the error code;
feat: implemented working custom validation;
fix: authservice begin/complete registration
2025-07-05 03:08:00 +03:00
0a51727af8 refactor: updated swagger;
feat: helper function in errors for checking postgres error types;
feat: sql query method for finding users by their email;
feat: registration begin/complete with checking existing username/email;
refactor: error handling in controller
2025-07-03 04:33:25 +03:00
d08db300fc fix: getconfirmationcode query 2025-07-02 14:09:10 +03:00
96e41efdec feat: added session guid and token type fields to jwt tokens;
feat: very minimal implementation of registration functions;
refactor: login function now uses the transactional db helper function and creates a session;
feat: enum for jwt token type
2025-07-01 14:18:01 +03:00
284d959bc3 feat: new general and auth errors;
feat: NewPointer helper function in utils;
refactor: length validation in auth models
2025-06-30 01:34:59 +03:00
e2d83aa779 refactor: database update methods use coalesce to omit nil fields 2025-06-27 13:30:03 +03:00
69d55ce060 fix: added missing return statement;
refactor: redundant comments
2025-06-25 16:21:16 +03:00
cbcfb8a286 feat: middleware for request body parsing, validation and authentication;
feat: helper function for getting request info from gin context
2025-06-24 17:31:48 +03:00
c2059dcd6e feat: middlewares for authorization and automatic request parsing;
feat: roles enum
2025-06-24 13:57:39 +03:00
be9aee7145 chore: GPL-3.0 license propagated into *.go files in backend 2025-06-24 01:37:47 +03:00
cfe60cfb8e chore: corrected misleading error descriptions, removed redundant comments 2025-06-24 01:11:49 +03:00
e5d245519a feat: preparing structures for validation features;
feat: config variables for password requirements;
feat: util function for validating passwords
2025-06-24 00:25:59 +03:00
0a00a5ee2b feat: registrationBegin method without email;
fix: missing sqlc query parameter name;
feat: util for generating security codes;
feat: enums package
2025-06-23 16:23:46 +03:00
1b55498b00 refactor: a better DI-friendy logger implementation that doesn't suck 2025-06-23 14:18:25 +03:00
ea3743cb04 fixed: error handling in commit;
refactor: exposed untransactional queries for transactional db helper again but with a clearer name this time since it still may be useful
2025-06-22 12:41:22 +03:00
613deae8e2 feat: db regular and transactional helpers to reduce boilerplate 2025-06-21 20:04:20 +03:00
ad118cc832 chore: removed database url print in config 2025-06-21 16:20:20 +03:00
a9b28c860f fix: viper not unmarshalling env variables into the struct 2025-06-21 16:18:56 +03:00
0c4d618fa4 feat: dbcontext abstraction via dependency 2025-06-21 02:27:23 +03:00
03c072e67b feat: dbcontext implements DBTX interface 2025-06-20 20:32:18 +03:00
8577314875 feat: dbcontext 2025-06-20 20:28:50 +03:00
0621bad6f8 chore: updated docs 2025-06-20 17:55:42 +03:00
b72645852b refactor: profile controller;
experiment: figured out a way to add auth middleware to individual methods in controllers, bypassing route group middleware if needed
2025-06-20 17:53:11 +03:00
8007b11731 refactor: made logger a dependency 2025-06-20 16:55:58 +03:00
7ad1336c88 experiment: swagger is back 2025-06-20 16:34:41 +03:00
9b7335a72e fix: got the gin logs back 2025-06-20 16:25:46 +03:00
aab55a143f experiment: successfully implemented dependency injections for controllers and services 2025-06-20 16:14:55 +03:00
654c1eb7b5 feat: prototyping possible interaction of database, controllers, services with auth service 2025-06-20 13:33:06 +03:00
87878f15a3 feat: service/controller prototype 2025-06-19 18:37:19 +03:00
912470b6e2 refactor: manually renamed password fields 2025-06-19 17:16:41 +03:00
49534d46c1 fix: fixed issue with comments in sqlc-generated go code;
refactor: creating/updating login_information takes plain password and hashes it in database;
feat: db query to get user by their login credentials
2025-06-19 17:10:52 +03:00
4e3554346a feat: auth middleware;
fix: backend healthcheck
2025-06-19 14:08:51 +03:00
fed517f905 chore: refreshed docs 2025-06-18 21:31:39 +03:00
c787fa929b fix: config for backend;
refactor: docker compose env variables
2025-06-18 21:27:19 +03:00
7a79028aa7 refactor: config 2025-06-18 20:17:04 +03:00
82a75bd616 chore: swagger comments 2025-06-18 18:34:41 +03:00
b1ef3e06f6 feat: initialized all controllers for release 1;
feat: authentication added to swagger
2025-06-18 18:27:12 +03:00