feat(security): #286 fix test
Some checks failed
Build Docker Image / Build-Docker-Image (push) Failing after 36s

This commit is contained in:
2024-12-08 23:21:29 +01:00
parent c9e0188b60
commit 7475d56949
8 changed files with 80 additions and 722 deletions

View File

@@ -128,10 +128,14 @@ func (service AuthImpl) SignInSession(sessionId string) (*Session, error) {
return nil, types.ErrInternal
}
if sessionDb.ExpiresAt.After(service.clock.Now()) {
if sessionDb.ExpiresAt.Before(service.clock.Now()) {
return nil, nil
}
if sessionDb.UserId == uuid.Nil {
return NewSession(sessionDb, nil), nil
}
userDb, err := service.db.GetUser(sessionDb.UserId)
if err != nil {
return nil, types.ErrInternal