Commit Graph

13 Commits

Author SHA1 Message Date
Artemy cc2921d257 Updeted Session Model and Session Opener Service
renamed RefreshToken in model to RefreshTokenHash - now we have a hash of token, not a token
2025-12-14 14:03:18 +07:00
Artemy 7e6f914878 technical edits 2025-12-12 17:23:01 +07:00
Artemy 1d442d037c Add cryptographic session key management for users
Introduces a new cryptographic key management system for user sessions, including models, DTOs, interfaces, and services for handling identity keys, signed pre-keys, and one-time pre-keys. Updates the SessionKeysController and DI configuration to use the new services. Adds related EF Core configurations and migrations, and updates the UserSession model to reference the new UserCryptoSession. Removes the obsolete ISessionKeyService interface.
2025-07-30 21:26:35 +07:00
Artemy 4054e4046a New Settings entity 2025-07-21 17:06:01 +07:00
Artemy c0d02e0fa1 Add access control for media downloads
Introduced IAccesserToDownloadMedia and its implementation to enforce access checks when downloading media files. Updated MediaController to use the new accesser service and improved error handling and validation in upload/download actions. Refactored and moved MediaService to the Medias namespace, registered new services in DI, and added comprehensive tests for access logic. Also fixed GroupMembershipConfiguration to make InvitationId optional and performed minor test and namespace cleanups.
2025-07-21 14:51:57 +07:00
Artemy ab643c16a4 Implement user session management and JWT refresh tokens
Added user session models, interfaces, repository, and service for managing user sessions and refresh tokens. Refactored authentication flow to return user objects and open sessions with device info, supporting refresh token generation and validation. Updated JWT configuration to separate access and refresh options, and refactored related tests and API contracts. Improved media upload handling and error logging. Migrated dependency references and DI registrations accordingly.
2025-07-18 20:16:36 +07:00
Artemy c7de2318fc using Govor.Core.Models.Users; 2025-07-11 21:52:37 +07:00
Artemy a68feb4a17 Refactor group existence checks and add group repo tests
Renamed IGroupsExist and related methods from Exists to Exist for consistency. Added integration tests for GroupRepository. Introduced entity configurations for ChatGroup, GroupAdmins, GroupInvitation, and updated GroupMembership configuration. Updated usages and tests to match new method names and improved equality checks for ChatGroup.
2025-07-07 20:49:20 +07:00
Artemy 66819a015a Refactor media attachments to use MediaFile entity
This commit introduces the MediaFile entity and updates the media attachments model, repositories, and related logic to reference MediaFile instead of storing file metadata directly in MediaAttachments. Controller, service, and SignalR request/response contracts are updated to support the new structure. Database configurations and validators are also adjusted accordingly. This refactor improves media management and normalization in the data model.
2025-07-06 21:09:12 +07:00
Artemy ec44347bbe Add username validation and initial friends feature
Introduced a UsernameValidator with Cyrillic and length checks, integrated into AuthService and registration flow. Added InvalidUsernameException and related interface. Updated User model to support friend requests, added FriendsController (stub), and configured Friendship entity in EF Core. Adjusted UserValidator max name length and removed navigation properties from PrivateChat.
2025-06-27 16:36:56 +07:00
Artemy ce013eae49 Registration rework
+ InvitesRepository
+ AdminsRepository
+ rework jwt
2025-06-24 14:27:08 +07:00
Artemy a6e8ba1a65 Update models Messages 2025-06-22 11:45:25 +07:00
Artemy d62c38db51 DbGovor init 2025-06-16 22:31:45 +07:00