Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Users contains all the sessions with sessionkey as key Users map[string]User // CreateSessionMux is the mux to keep everything safe CreateSessionMux sync.Mutex )
Functions ¶
func CreateUserToken ¶
CreateUserToken creates a user bound to a token
func DeleteUserToken ¶
DeleteUserToken deletes the user out of the Users map
Types ¶
type User ¶
type User struct { AuthToken string Username string TokenCreated time.Time TokenExpiresAt time.Time TokenGetDeletedAt time.Time Timer *time.Timer }
User is a struct for every logged in client
func GetUserToken ¶
GetUserToken gets the token bound to the user if exists
func (*User) GetTokenPostResponse ¶
GetTokenPostResponse returns the Post data for Get Token
Click to show internal directories.
Click to hide internal directories.