Documentation
¶
Index ¶
- func CheckAccountLockout(app App, userId string) error
- func CheckPasswordChangeFrequency(app App, userId string) error
- func CheckPasswordReuse(app App, userId string, newPassword string) error
- func HashPassword(password string) string
- func TrackFailedAuthAttempt(app App, userId string) error
- func TrackPasswordChange(app App, userId string, password string, success bool)
- type App
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAccountLockout ¶
CheckAccountLockout checks if account is locked
func CheckPasswordChangeFrequency ¶
CheckPasswordChangeFrequency enforces max 5 password changes per 24h
func CheckPasswordReuse ¶
CheckPasswordReuse prevents reusing passwords within 24 hours
func HashPassword ¶
HashPassword creates SHA-256 hash of password for reuse checking
func TrackFailedAuthAttempt ¶
TrackFailedAuthAttempt tracks failed login attempts and locks account after 5 failures
Types ¶
type App ¶
type App interface {
FindCollectionByNameOrId(collectionNameOrId string) (*core.Collection, error)
FindRecordsByFilter(collection any, filter string, sort string, limit int, offset int, params ...dbx.Params) ([]*core.Record, error)
Save(record core.Model) error
}
App interface for testability
Click to show internal directories.
Click to hide internal directories.