Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateToken ¶
CreateToken returns token use jwt with custom claims
func Md5Encrypt ¶
Md5Encrypt returns secret key use Mk5 encryption with username and password
Types ¶
type Authentication ¶
type Authentication interface { // Validate validates the token Validate(next http.Handler) http.Handler }
func NewAuthentication ¶
func NewAuthentication(user config.User) Authentication
NewAuthentication creates authentication api instance
type CustomClaims ¶
type CustomClaims struct { jwt.StandardClaims UserName string `json:"username"` Password string `json:"password"` }
CustomClaims represents jwt custom claims param need username and password and some standard claims
Click to show internal directories.
Click to hide internal directories.