Files
zitadel/backend/v3/domain/mock/human_repo.go
T
Marco A.andGitHub 3c3201e5a0 feat(session): Password Check API with relation tables (#11804)
# Which Problems Are Solved

As part of #11035 , this PR implements the password check logic for
session validation

# How the Problems Are Solved

- Add system config to default configuration of `domain` package for
easy initialization. Intialize the system settings when Zitadel starts
up
- Add password hasher verify logic to the default configuration of
`domain` package. Initialize it when Zitadel starts up.
  - Add settings repositories with their mocks
  - Implement the logic for doing a password check

# Additional Context

This is a cherry-picked PR + minor changes, coming from
https://github.com/zitadel/zitadel/pull/11164
- Relates to #11035
- Depends on https://github.com/zitadel/zitadel/pull/11777
2026-03-13 11:40:48 +01:00

32 lines
869 B
Go

package domainmock
import (
context "context"
gomock "go.uber.org/mock/gomock"
domain "github.com/zitadel/zitadel/backend/v3/domain"
database "github.com/zitadel/zitadel/backend/v3/storage/database"
"github.com/zitadel/zitadel/backend/v3/storage/database/repository"
)
func NewHumanRepo(ctrl *gomock.Controller) *HumanRepo {
return &HumanRepo{
mock: NewMockHumanUserRepository(ctrl),
HumanUserRepository: repository.HumanUserRepository(),
}
}
type HumanRepo struct {
domain.HumanUserRepository
mock *MockHumanUserRepository
}
func (u *HumanRepo) EXPECT() *MockHumanUserRepositoryMockRecorder {
return u.mock.EXPECT()
}
func (u *HumanRepo) Update(ctx context.Context, client database.QueryExecutor, condition database.Condition, changes ...database.Change) (int64, error) {
return u.mock.Update(ctx, client, condition, changes...)
}