Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckEmail ¶
CheckEmail checks the email online with full validation
func SessionEncoding ¶
SessionEncoding utility function to generate specific Encding for session
func SessionHash ¶
SessionHash utility function to generate hash based on token
Types ¶
type Session ¶
type Session struct { CreatedOn time.Time `json:"createdon" bson:"createdon"` UserTag string `json:"usertag" bson:"usertag"` RequestHash string `json:"requesthash" bson:"requesthash"` ResponseHash string `json:"responsehash" bson:"responsehash"` SessionToken string `json:"sessiontoken" bson:"sessiontoken"` LastUpdate time.Time `json:"lastupdate" bson:"lastupdate"` LastAccessURI string `json:"lastaccessuri" bson:"lastaccessuri"` Duration time.Duration `json:"duration" bson:"duration"` }
Session specific user logon session
func NewSession ¶
NewSession create a new session
func (*Session) UpdateSession ¶
UpdateSession the session with current time
type User ¶
type User struct { Email string `json:"email" bson:"email"` PHash []byte `json:"phash" bson:"phash"` // Password Hash }
User data type
func (User) CheckPassword ¶
CheckPassword as the same suggests
func (*User) SetPassword ¶
SetPassword assigns the Base64 encoded Password hash
Click to show internal directories.
Click to hide internal directories.