优化结构

This commit is contained in:
Yvan
2026-08-27 22:33:43 +08:00
parent 5052835fcb
commit e407d3ac10
86 changed files with 3151 additions and 726 deletions
+7
View File
@@ -55,6 +55,13 @@ func (s *SecurityService) ValidatePassword(ctx context.Context, password string)
if err != nil {
return err
}
return s.ValidatePasswordWithConfig(cfg, password)
}
func (s *SecurityService) ValidatePasswordWithConfig(cfg *system.SecurityConfig, password string) error {
if cfg == nil {
return errors.New("安全配置不可用")
}
if err := s.uc.ValidatePassword(cfg, password); err != nil {
return &PasswordPolicyError{Err: err}
}