implemented auth repository and service in dart (JWT)

This commit is contained in:
2025-01-03 22:28:25 +00:00
parent 6cf055db22
commit 05fdefc3e2
45 changed files with 868 additions and 46 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ func main() {
projectRepo := repository.NewProjectRepository(database.Projects())
projectTaskRepo := repository.NewProjectTaskRepository(database.ProjectTasks())
timeEntryRepo := repository.NewTimeEntryRepository(database.TimeEntries())
authRepo := repository.NewInMemoryAuthRepository("secret")
authRepo := repository.NewInMemoryAuthRepositoryImpl("secret")
// Initialize services
userService := services.NewUserService(userRepo)
@@ -19,7 +19,7 @@ type InMemoryAuthRepository struct {
mu sync.RWMutex
}
func NewInMemoryAuthRepository(secretKey string) repository.AuthRepository {
func NewInMemoryAuthRepositoryImpl(secretKey string) repository.AuthRepository {
return &InMemoryAuthRepository{
secretKey: secretKey,
sessionCache: make(map[string]string),