Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckJwt ¶
func CheckJwt(w http.ResponseWriter, r *http.Request)
CheckJwt if token is JWT and have time
func OpenAuthCollection ¶
func OpenAuthCollection()
OpenAuthCollection open the collection of mongoDB called auth
func RegisterUser ¶
func RegisterUser(w http.ResponseWriter, r *http.Request)
RegisterUser function use in V1 router for sign up user
func SetPassword ¶
SetPassword example usage of this two functions pass := SetPassword(password)
func SignJWT ¶
func SignJWT(w http.ResponseWriter, r *http.Request)
SignJWT function to create jwt token
func ValidPassword ¶
ValidPassword bo := ValidPassword(pass, "as") fmt.Println(pass, bo)
Types ¶
Click to show internal directories.
Click to hide internal directories.