Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestUserLogin ¶
TestUserLogin tests the username and password combination entered
Types ¶
type User ¶
type User struct { daggertech.Model UserID string `daggertech:"size:128,key:true"` FirstName string `daggertech:"size:128"` LastName string `daggertech:"size:128"` Email string `daggertech:"size:128"` Password string `daggertech:"size:128"` LastLogin *time.Time `daggertech:"type:time"` PasswordExpiry *time.Time `daggertech:"type:time"` PasswordForceChange bool `daggertech:""` UnlockTime *time.Time `daggertech:"type:time"` }
User is the struct for user details
func CreateUser ¶
CreateUser creates a new user record
func GetUserByID ¶
GetUserByID returns the user record for the passed ID
func GetUserByUserID ¶
GetUserByUserID returns the user with the specified UserID
func (*User) ForcePasswordExpiry ¶
func (u *User) ForcePasswordExpiry()
ForcePasswordExpiry sets the password forced flag
func (*User) HashPassword ¶
HashPassword creates the password hash
func (*User) UpdatePassword ¶
UpdatePassword updates the user password
type UserState ¶
type UserState int
UserState is the result of the user logging in
const ( // UserOK indicates that the user has successfully logged in UserOK UserState = iota // UserInvalid indicates that the user has not successfully logged in UserInvalid // UserPasswordExpired indicates that the user has successfully logged in, but // they need to change the password UserPasswordExpired // UserLocked indicates that the user account has been locked UserLocked )
Click to show internal directories.
Click to hide internal directories.