Accept user in CreateToken

This commit is contained in:
2016-12-20 13:43:15 +01:00
parent e955638510
commit b5114beacf
3 changed files with 8 additions and 5 deletions

View File

@ -118,7 +118,7 @@ func (h *Handler) loginPost(c *gin.Context) {
return
}
t, err := h.TokenVerifier.CreateToken(user.Email, user.Name)
t, err := h.TokenVerifier.CreateToken(user)
if err != nil {
c.AbortWithStatus(http.StatusUnauthorized)
}