Documentation
¶
Index ¶
- func AuthMiddleware(w http.ResponseWriter, r *http.Request) string
- func AuthenticateRequest(w http.ResponseWriter, req *http.Request) (string, bool)
- func CheckPassword(password string, hash string) bool
- func CreateToken(claims map[string]interface{}) (string, error)
- func GetAuthenticatedUser(w http.ResponseWriter, r *http.Request) string
- func HashPassword(password string) string
- func Login(input LoginInput, t string) (string, error)
- func NewTokenAuth() *jwtauth.JWTAuth
- func VerifyToken(tokenString string) bool
- type LoginInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthMiddleware ¶ added in v1.1.0
func AuthMiddleware(w http.ResponseWriter, r *http.Request) string
func AuthenticateRequest ¶ added in v1.1.0
func CheckPassword ¶
func CreateToken ¶
func GetAuthenticatedUser ¶ added in v1.1.0
func GetAuthenticatedUser(w http.ResponseWriter, r *http.Request) string
func HashPassword ¶
func NewTokenAuth ¶
func NewTokenAuth() *jwtauth.JWTAuth
func VerifyToken ¶
Types ¶
type LoginInput ¶
Click to show internal directories.
Click to hide internal directories.