Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot log jwt.Claims #6

Open
ORESoftware opened this issue Mar 11, 2020 · 0 comments
Open

cannot log jwt.Claims #6

ORESoftware opened this issue Mar 11, 2020 · 0 comments

Comments

@ORESoftware
Copy link
Owner

the call was:

	token := jwt.New(jwt.GetSigningMethod("RS256"))
	claims := token.Claims.(jwt.MapClaims)
	claims["user_id"] = user.ID
	claims["exp"] = expiryDate
	jlog.DefaultLogger.Info("Cliams 1: ",token.Claims)

the result was:

20:08:24.51178 INFO app:Default 'Cliams 1: ' [2020-03-11T13:08:24.511-07:00] [API] [panic-handler.go:68] [ERROR] Caught error in defer/recover middleware:  strconv: illegal AppendInt/FormatInt base
[2020-03-11T13:08:24.512-07:00] [API] [panic-handler.go:69] [ERROR] Caught error in defer/recover middleware:  strconv: illegal AppendInt/FormatInt base
[2020-03-11T13:08:24.512-07:00] [API] [panic-handler.go:74] [ERROR] To see full stack trace use debug.PrintStack()
        /home/oleg/go/src/github.com/channelmeter/cp-go-api/v1/middleware/panic-handler.go:75 +0x24a
        /home/oleg/go/src/github.com/channelmeter/cp-go-api/v1/routes/login/handlers.go:172 +0x67c
        /home/oleg/go/src/github.com/channelmeter/cp-go-api/cp_api.go:120 +0xdd
        /home/oleg/go/src/github.com/channelmeter/cp-go-api/v1/middleware/log-json-body.go:59 +0xb38
        /home/oleg/go/src/github.com/channelmeter/cp-go-api/v1/middleware/tracing.go:56 +0x105
        /home/oleg/go/src/github.com/channelmeter/cp-go-api/v1/middleware/panic-handler.go:147 +0x7e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant