Support auto-login.

This commit is contained in:
Yang Luo
2021-03-28 16:35:59 +08:00
parent 2029a28d7b
commit f5ceae901b
9 changed files with 125 additions and 18 deletions

View File

@ -58,7 +58,7 @@ func generateJwtToken(application *Application, user *User) (string, error) {
return token, err
}
func parseJwtToken(token string) (*Claims, error) {
func ParseJwtToken(token string) (*Claims, error) {
tokenClaims, err := jwt.ParseWithClaims(token, &Claims{}, func(token *jwt.Token) (interface{}, error) {
return jwtSecret, nil
})