slumber icon indicating copy to clipboard operation
slumber copied to clipboard

go run fails because of dependencies uuid and jwt-go

Open sillysachin opened this issue 8 years ago • 9 comments

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

sillysachin avatar Sep 12 '16 16:09 sillysachin

get v2.7 of jwt-go project to resolve the issues in slumber-sessions.

viraf avatar Sep 21 '16 16:09 viraf

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

ceceps avatar Sep 22 '16 13:09 ceceps

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

viraf avatar Sep 22 '16 13:09 viraf

same for the https://github.com/twinj/uuid/releases/tag/0.10.0

viraf avatar Sep 22 '16 13:09 viraf

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 ?

ceceps avatar Sep 22 '16 13:09 ceceps

Use the uuid package from the link https://github.com/twinj/uuid/releases/tag/0.10.0 your uuid package is different

viraf avatar Sep 22 '16 13:09 viraf

It has solved when those package (uuid and jwt-go) download manually not using go get command

ceceps avatar Sep 22 '16 14:09 ceceps

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.

viraf avatar Sep 22 '16 18:09 viraf

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

grdsdev avatar Oct 18 '16 00:10 grdsdev