Skip to content

Commit

Permalink
Added go modules and pointed jwt package to github.com/golang-jwt/jwt
Browse files Browse the repository at this point in the history
  • Loading branch information
jondunning committed Oct 3, 2022
1 parent ba9bf3d commit 69df644
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 102 deletions.
8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

61 changes: 0 additions & 61 deletions Gopkg.lock

This file was deleted.

16 changes: 0 additions & 16 deletions Gopkg.toml

This file was deleted.

16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Programming Language applications. JWTs are typically used to protect API
endpoints, and are often issued using OpenID Connect.

[![Build Status](https://travis-ci.org/jgillich/jwt-middleware.svg?branch=master)](https://travis-ci.org/jgillich/jwt-middleware)
[![GoDoc](https://godoc.org/github.com/jgillich/jwt-middleware?status.svg)](https://godoc.org/github.com/jgillich/jwt-middleware)
[![GoDoc](https://godoc.org/github.com/fortx/jwt-middleware?status.svg)](https://godoc.org/github.com/fortx/jwt-middleware)

## Key Features

Expand All @@ -19,7 +19,7 @@ endpoints, and are often issued using OpenID Connect.
## Installing

````bash
go get github.com/jgillich/jwt-middleware
go get github.com/fortx/jwt-middleware
````

## Using it
Expand All @@ -34,8 +34,8 @@ import (
"fmt"
"net/http"

"github.com/jgillich/jwt-middleware"
"github.com/dgrijalva/jwt-go"
"github.com/fortx/jwt-middleware"
"github.com/golang-jwt/jwt"
)

var myHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Expand Down Expand Up @@ -77,9 +77,9 @@ import (
"fmt"
"net/http"

"github.com/jgillich/jwt-middleware"
"github.com/fortx/jwt-middleware"
"github.com/urfave/negroni"
"github.com/dgrijalva/jwt-go"
"github.com/golang-jwt/jwt"
"github.com/gorilla/mux"
)

Expand Down Expand Up @@ -127,7 +127,7 @@ type Options struct {
// Default value: nil
ValidationKeyGetter jwt.Keyfunc
// The function that will be called when there's an error validating the token
// Default value: https://github.com/jgillich/jwt-middleware/blob/master/jwtmiddleware.go#L35
// Default value: https://github.com/fortx/jwt-middleware/blob/master/jwtmiddleware.go#L35
ErrorHandler errorHandler
// A boolean indicating if the credentials are required or not
// Default value: false
Expand Down Expand Up @@ -184,7 +184,7 @@ jwtmiddleware.New(jwtmiddleware.Options{

## Examples

You can check out working examples in the [examples folder](https://github.com/jgillich/jwt-middleware/tree/master/examples)
You can check out working examples in the [examples folder](https://github.com/fortx/jwt-middleware/tree/master/examples)

## License

Expand Down
7 changes: 4 additions & 3 deletions examples/martini-example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package main

import (
"encoding/json"
"github.com/jgillich/jwt-middleware"
"github.com/dgrijalva/jwt-go"
"github.com/go-martini/martini"
"net/http"

jwtmiddleware "github.com/fortx/jwt-middleware"
"github.com/go-martini/martini"
"github.com/golang-jwt/jwt"
)

func main() {
Expand Down
9 changes: 5 additions & 4 deletions examples/negroni-example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package main

import (
"encoding/json"
"github.com/jgillich/jwt-middleware"
"github.com/urfave/negroni"
"github.com/dgrijalva/jwt-go"
"github.com/gorilla/mux"
"net/http"

jwtmiddleware "github.com/fortx/jwt-middleware"
"github.com/golang-jwt/jwt"
"github.com/gorilla/mux"
"github.com/urfave/negroni"
)

func main() {
Expand Down
18 changes: 18 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module github.com/fortx/jwt-middleware

go 1.18

require (
github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab
github.com/gorilla/mux v1.8.0
github.com/smartystreets/goconvey v1.7.2
github.com/urfave/negroni v1.0.0
)

require (
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 // indirect
github.com/jtolds/gls v4.20.0+incompatible // indirect
github.com/smartystreets/assertions v1.2.0 // indirect
)
23 changes: 23 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q=
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab h1:xveKWz2iaueeTaUgdetzel+U7exyigDYBryyVfV/rZk=
github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8=
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/smartystreets/assertions v1.2.0 h1:42S6lae5dvLc7BrLu/0ugRtcFVjoJNMC/N3yZFZkDFs=
github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo=
github.com/smartystreets/goconvey v1.7.2 h1:9RBaZCeXEQ3UselpuwUQHltGVXvdwm6cv1hgR6gDIPg=
github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM=
github.com/urfave/negroni v1.0.0 h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc=
github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
2 changes: 1 addition & 1 deletion jwtmiddleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http"
"strings"

"github.com/dgrijalva/jwt-go"
"github.com/golang-jwt/jwt"
)

// TokenContextKey is used as context key for the token on http requests
Expand Down
2 changes: 1 addition & 1 deletion jwtmiddleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"testing"

"github.com/dgrijalva/jwt-go"
"github.com/golang-jwt/jwt"
"github.com/gorilla/mux"
. "github.com/smartystreets/goconvey/convey"
"github.com/urfave/negroni"
Expand Down

0 comments on commit 69df644

Please sign in to comment.