slumber
slumber copied to clipboard
go run fails because of dependencies uuid and jwt-go
github.com/sogko/slumber-sessions
sogko/slumber-sessions/token_authority.go:47: cannot use map[string]interface {} literal (type map[string]interface {}) as type jwt.Claims in assignment: map[string]interface {} does not implement jwt.Claims (missing Valid method) sogko/slumber-sessions/token_authority.go:67: invalid operation: token.Token.Claims["userId"](type jwt.Claims does not support indexing) sogko/slumber-sessions/token_authority.go:68: invalid operation: token.Token.Claims["userId"](type jwt.Claims does not support indexing) sogko/slumber-sessions/token_authority.go:70: invalid operation: token.Token.Claims["jti"](type jwt.Claims does not support indexing) sogko/slumber-sessions/token_authority.go:71: invalid operation: token.Token.Claims["jti"](type jwt.Claims does not support indexing) sogko/slumber-sessions/token_authority.go:73: invalid operation: token.Token.Claims["iat"](type jwt.Claims does not support indexing) sogko/slumber-sessions/token_authority.go:74: invalid operation: token.Token.Claims["iat"](type jwt.Claims does not support indexing) sogko/slumber-sessions/token_authority.go:76: invalid operation: token.Token.Claims["exp"](type jwt.Claims does not support indexing) sogko/slumber-sessions/token_authority.go:77: invalid operation: token.Token.Claims["exp"](type jwt.Claims does not support indexing)
github.com/sogko/slumber-users
sogko/slumber-users/users.go:90: undefined: uuid.Clean
get v2.7 of jwt-go project to resolve the issues in slumber-sessions.
I had same issue with @sillysachin, but currently jwt-go project https://github.com/dgrijalva/jwt-go has released version 3.0.0, i try to install it as usual but after when to get your package that I keep failed, how to get version 2.7.0 with go get jwt-go
https://github.com/dgrijalva/jwt-go/releases/tag/v2.7.0 this will download an archive unzip this in your src/github/drjialva/jwt-go folder to replace all the content. The one that you have now is the latest version v3 which is not compatible with slumber
same for the https://github.com/twinj/uuid/releases/tag/0.10.0
I try to follow your suggest, these currently the error, package UUID i already install at github.com/pborman/uuid
$ go version
go version go1.7.1 windows/amd64
$ go get github.com/sogko/slumber
# github.com/dgrijalva/jwt-go
github.com\dgrijalva\jwt-go\claims.go:46: undefined: ValidationErrorIssuedAt
github.com\dgrijalva\jwt-go\map_claims.go:81: undefined: ValidationErrorIssuedAt
# github.com/sogko/slumber-users
github.com\sogko\slumber-users\users.go:90: undefined: uuid.Clean
what I am missing ?
Use the uuid package from the link https://github.com/twinj/uuid/releases/tag/0.10.0 your uuid package is different
It has solved when those package (uuid and jwt-go) download manually not using go get
command
Yes. This project has not been updated to use the latest version of the dependent components. I too just like you are trying to figure out the working of this project.
Hello guys, I was able to solve the jwt-go issue.
I've opened a pull request with the working code in the slumber-sessions repository.
Please take a look, https://github.com/sogko/slumber-sessions/pull/2