Skip to content

cannot log jwt.Claims #6

Description

@ORESoftware

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions