Tweak token response for ESA1.0

This commit is contained in:
Matthew Ryan Dillon 2015-10-20 16:22:08 -07:00
parent dd4fbc4cf8
commit 88d1bb5fe4
2 changed files with 7 additions and 5 deletions

View file

@ -16,6 +16,8 @@ var (
Secret: os.Getenv("SECRET"),
Auth: models.DbAuthenticate,
Claims: claimsFunc,
IdentityField: "username",
VerifyField: "password",
}
)

View file

@ -64,7 +64,7 @@ func tokenHandler(h http.Handler) http.Handler {
})
} else {
data, _ = json.Marshal(struct {
Token string `json:"token"`
Token string `json:"access_token"`
}{
Token: tokenData,
})
@ -92,7 +92,7 @@ func tokenRefresh(j *jwt.Middleware) errorHandler {
}
data, _ := json.Marshal(struct {
Token string `json:"token"`
Token string `json:"access_token"`
}{
Token: token,
})