mirror of
https://github.com/andwati/zitadel.git
synced 2026-12-03 09:28:55 +00:00
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
This commit is contained in:
@@ -3,11 +3,15 @@ package domain
|
||||
import (
|
||||
"github.com/zitadel/zitadel/backend/v3/storage/database"
|
||||
"github.com/zitadel/zitadel/backend/v3/storage/eventstore"
|
||||
"github.com/zitadel/zitadel/internal/config/systemdefaults"
|
||||
"github.com/zitadel/zitadel/internal/crypto"
|
||||
)
|
||||
|
||||
var (
|
||||
pool database.Pool
|
||||
legacyEventstore eventstore.LegacyEventstore
|
||||
sysConfig systemdefaults.SystemDefaults
|
||||
passwordHasher *crypto.Hasher
|
||||
)
|
||||
|
||||
func SetPool(p database.Pool) {
|
||||
@@ -17,3 +21,11 @@ func SetPool(p database.Pool) {
|
||||
func SetLegacyEventstore(es eventstore.LegacyEventstore) {
|
||||
legacyEventstore = es
|
||||
}
|
||||
|
||||
func SetSystemConfig(cfg systemdefaults.SystemDefaults) {
|
||||
sysConfig = cfg
|
||||
}
|
||||
|
||||
func SetPasswordHasher(hasher *crypto.Hasher) {
|
||||
passwordHasher = hasher
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user