Documentation
¶
Index ¶
Constants ¶
View Source
const ( SUCCESS = 200 INVALID_PARAMS = 99 ERROR_AUTH_CHECK_TOKEN_TIMEOUT = 98 ERROR_AUTH_CHECK_TOKEN_FAIL = 97 ISSUER = "realjf" )
Variables ¶
This section is empty.
Functions ¶
func GenerateToken ¶
Types ¶
type Authentication ¶
type Authentication struct {
// contains filtered or unexported fields
}
func NewAuthentication ¶
func NewAuthentication() *Authentication
func (*Authentication) Middleware ¶
func (amw *Authentication) Middleware(next http.Handler) http.Handler
Middleware function, which will be called for each request
type Claims ¶
type Claims struct { Username string `json:"username"` Password string `json:"password"` jwt.StandardClaims }
func ParseToken ¶
Click to show internal directories.
Click to hide internal directories.