diff --git a/go.mod b/go.mod index ee95f92..4d147a1 100644 --- a/go.mod +++ b/go.mod @@ -61,6 +61,7 @@ require ( github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/spec v0.21.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect + github.com/golang-jwt/jwt/v5 v5.3.0 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect @@ -113,7 +114,6 @@ require ( github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.6 github.com/aws/aws-sdk-go-v2/service/rekognition v1.40.4 github.com/bytedance/sonic v1.11.8 // indirect - github.com/dgrijalva/jwt-go v3.2.0+incompatible github.com/gabriel-vasile/mimetype v1.4.4 // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-playground/locales v0.14.1 // indirect diff --git a/go.sum b/go.sum index 70e5d0f..99208bb 100644 --- a/go.sum +++ b/go.sum @@ -319,6 +319,8 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo= +github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= diff --git a/pkg/http/jwt.go b/pkg/http/jwt.go index ca35c6f..2c538de 100644 --- a/pkg/http/jwt.go +++ b/pkg/http/jwt.go @@ -6,14 +6,14 @@ import ( "net/http" "strings" - "github.com/dgrijalva/jwt-go" + "github.com/golang-jwt/jwt/v5" ) // Claims defines the JWT struct type Claims struct { Email string `json:"email"` ID string `json:"id"` - jwt.StandardClaims + jwt.RegisteredClaims } // ExtractJWTFromRequest gets the JWT from the request diff --git a/readme.md b/readme.md index c4059bc..57e569f 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ # Filepoint -Filepoint is the Gearpoint's file management service. It's built for performance and high disponibility. +Filepoint is the Gearpoint's file management service. It's built for performance and high availability. ## Tech Stack @@ -59,7 +59,8 @@ Now, you'll need to setup your environment configuration. Here we'll be using th make run-services ``` -2. Configure the Webhook listeChange the {{ your_unique_id }} value in your config files to your actual webhook endpoint. +2. Configure the Webhook listener: + First, change the {{ your_unique_id }} value in your config files to your actual webhook endpoint. You can use the local webhooks.site deploy at [localhost:8084](http://localhost:8084) or any other webhooks listener.