32 lines
862 B
Go
32 lines
862 B
Go
package biz
|
|
|
|
import "context"
|
|
|
|
type SecurityConfig struct {
|
|
ID uint
|
|
CaptchaOpen int
|
|
CaptchaTimeout int
|
|
KeyLong int
|
|
ImgWidth int
|
|
ImgHeight int
|
|
PwdMinLength int
|
|
PwdRequireUpper bool
|
|
PwdRequireLower bool
|
|
PwdRequireDigit bool
|
|
PwdRequireSpecial bool
|
|
LimitEnable bool
|
|
LimitWindow int
|
|
LimitCount int
|
|
LockEnable bool
|
|
LockThreshold int
|
|
LockDuration int
|
|
PwdExpireEnable bool
|
|
PwdExpireDays int
|
|
ForceNewUserChangePassword bool
|
|
}
|
|
|
|
type SecurityRepo interface {
|
|
SecurityConfig(context.Context) (*SecurityConfig, error)
|
|
SaveSecurityConfig(context.Context, *SecurityConfig) error
|
|
}
|