From 1e45ae2ea3497958b2ea6a20137955cfc3bbc964 Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Wed, 11 Dec 2024 17:05:12 +0100 Subject: feat: Add UI/Handler login process It adds the whole workflow to store and handle login on both UI and handler level. With that the login information should be available at any point given the context. --- pkg/service/auth.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pkg/service/auth.go') diff --git a/pkg/service/auth.go b/pkg/service/auth.go index 1fbf4b6..0dbd960 100644 --- a/pkg/service/auth.go +++ b/pkg/service/auth.go @@ -23,7 +23,13 @@ type ( } ) -var tokenSeed = []byte("cerrado") +var tokenSeed = []byte("this is a token for cerrado") + +func NewAuthService(repostiory authRepository) *AuthService { + return &AuthService{ + authRepository: repostiory, + } +} func (a *AuthService) CheckAuth(username, password string) bool { passphrase := a.authRepository.GetPassphrase() -- cgit v1.2.3