Documentation ¶
Index ¶
- func InitTrailHandler(enabled bool, handlerURL string) error
- func IsSamePassword(hashedPassword []byte, password string) bool
- func MakePasswordError(reason PasswordViolationReason, message string, info map[string]interface{}) skyerr.Error
- func Trail(entry Entry)
- type Entry
- type Event
- type PasswordChecker
- type PasswordViolationReason
- type PwHousekeeper
- type ValidatePasswordPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitTrailHandler ¶
func IsSamePassword ¶
func MakePasswordError ¶ added in v1.4.0
func MakePasswordError(reason PasswordViolationReason, message string, info map[string]interface{}) skyerr.Error
Types ¶
type Entry ¶
type Event ¶
type Event int
const ( // EventLoginSuccess represents Login Success EventLoginSuccess Event // EventLoginFailure represents Login Failure EventLoginFailure // EventLogout represents Logout EventLogout // EventSignup represents Signup EventSignup // EventChangePassword represents Change Password EventChangePassword // EventChangeRoles represents Change Roles EventChangeRoles // EventResetPassword represents Reset Password EventResetPassword // EventDisableUser represents Disable User EventDisableUser // EventEnableUser represents Enable User EventEnableUser )
type PasswordChecker ¶
type PasswordChecker struct { PwMinLength int PwUppercaseRequired bool PwLowercaseRequired bool PwDigitRequired bool PwSymbolRequired bool PwMinGuessableLevel int PwExcludedKeywords []string PwExcludedFields []string PwHistorySize int PwHistoryDays int PasswordHistoryEnabled bool }
func (*PasswordChecker) ShouldSavePasswordHistory ¶
func (pc *PasswordChecker) ShouldSavePasswordHistory() bool
func (*PasswordChecker) ValidatePassword ¶
func (pc *PasswordChecker) ValidatePassword(payload ValidatePasswordPayload) skyerr.Error
type PasswordViolationReason ¶ added in v1.4.0
type PasswordViolationReason int
PasswordViolationReason is a detailed explanation of skyerr.PasswordPolicyViolated
const ( // PasswordTooShort is self-explanatory PasswordTooShort PasswordViolationReason = iota // PasswordUppercaseRequired means the password does not contain ASCII uppercase character PasswordUppercaseRequired // PasswordLowercaseRequired means the password does not contain ASCII lowercase character PasswordLowercaseRequired // PasswordDigitRequired means the password does not contain ASCII digit character PasswordDigitRequired // PasswordSymbolRequired means the password does not contain ASCII non-alphanumeric character PasswordSymbolRequired // PasswordContainingExcludedKeywords means the password contains configured excluded keywords PasswordContainingExcludedKeywords // PasswordBelowGuessableLevel means the password's guessable level is below configured level. // The current implementation uses Dropbox's zxcvbn. PasswordBelowGuessableLevel // PasswordReused is self-explanatory PasswordReused // PasswordExpired is self-explanatory PasswordExpired )
func (PasswordViolationReason) String ¶ added in v1.4.0
func (r PasswordViolationReason) String() string
type PwHousekeeper ¶
type PwHousekeeper struct { AppName string AccessControl string DBOpener skydb.DBOpener DBImpl string Option string DBConfig skydb.DBConfig PwHistorySize int PwHistoryDays int PasswordHistoryEnabled bool }
func (*PwHousekeeper) Housekeep ¶
func (p *PwHousekeeper) Housekeep(authID string)
Click to show internal directories.
Click to hide internal directories.