Skip to content

Commit

Permalink
Rename module to test go.mod
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimiroff committed May 23, 2018
1 parent c470928 commit f3f17e6
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 18 deletions.
2 changes: 1 addition & 1 deletion cmd/jwt/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"regexp"
"strings"

jwt "github.com/dgrijalva/jwt-go"
jwt "github.com/vladimiroff/jwt-go/v3"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion ecdsa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"testing"

"github.com/dgrijalva/jwt-go"
jwt "github.com/vladimiroff/jwt-go/v3"
)

var ecdsaTestData = []struct {
Expand Down
3 changes: 2 additions & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package jwt_test

import (
"fmt"
"github.com/dgrijalva/jwt-go"
"time"

jwt "github.com/vladimiroff/jwt-go/v3"
)

// Example (atypical) using the StandardClaims type by itself to parse a token.
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
module github.com/dgrijalva/jwt/v3
module github.com/vladimiroff/jwt-go/v3

require github.com/dgrijalva/jwt-go v1.0.2
5 changes: 3 additions & 2 deletions hmac_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package jwt_test

import (
"fmt"
"github.com/dgrijalva/jwt-go"
"io/ioutil"
"time"

jwt "github.com/vladimiroff/jwt-go/v3"
)

// For HMAC signing method, the key can be any []byte. It is recommended to generate
Expand Down Expand Up @@ -51,7 +52,7 @@ func ExampleParse_hmac() {
if _, ok := token.Method.(*jwt.SigningMethodHMAC); !ok {
return nil, fmt.Errorf("Unexpected signing method: %v", token.Header["alg"])
}

// hmacSampleSecret is a []byte containing your secret, e.g. []byte("my_secret_key")
return hmacSampleSecret, nil
})
Expand Down
3 changes: 2 additions & 1 deletion hmac_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package jwt_test

import (
"github.com/dgrijalva/jwt-go"
"io/ioutil"
"strings"
"testing"

jwt "github.com/vladimiroff/jwt-go/v3"
)

var hmacTestData = []struct {
Expand Down
5 changes: 3 additions & 2 deletions http_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import (
"bytes"
"crypto/rsa"
"fmt"
"github.com/dgrijalva/jwt-go"
"github.com/dgrijalva/jwt-go/request"
"io"
"io/ioutil"
"log"
Expand All @@ -17,6 +15,9 @@ import (
"net/url"
"strings"
"time"

jwt "github.com/vladimiroff/jwt-go/v3"
"github.com/vladimiroff/jwt-go/v3/request"
)

// location of the files used for signing and verification
Expand Down
3 changes: 2 additions & 1 deletion none_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package jwt_test

import (
"github.com/dgrijalva/jwt-go"
"strings"
"testing"

jwt "github.com/vladimiroff/jwt-go/v3"
)

var noneTestData = []struct {
Expand Down
4 changes: 2 additions & 2 deletions parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"testing"
"time"

"github.com/dgrijalva/jwt-go"
"github.com/dgrijalva/jwt-go/test"
jwt "github.com/vladimiroff/jwt-go/v3"
"github.com/vladimiroff/jwt-go/v3/test"
)

var keyFuncError error = fmt.Errorf("error loading key")
Expand Down
3 changes: 2 additions & 1 deletion request/request.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package request

import (
"github.com/dgrijalva/jwt-go"
"net/http"

jwt "github.com/vladimiroff/jwt-go/v3"
)

// Extract and parse a JWT token from an HTTP request.
Expand Down
5 changes: 3 additions & 2 deletions request/request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package request

import (
"fmt"
"github.com/dgrijalva/jwt-go"
"github.com/dgrijalva/jwt-go/test"
"net/http"
"net/url"
"reflect"
"strings"
"testing"

jwt "github.com/vladimiroff/jwt-go/v3"
"github.com/vladimiroff/jwt-go/v3/test"
)

var requestTestData = []struct {
Expand Down
2 changes: 1 addition & 1 deletion rsa_pss_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
"testing"

"github.com/dgrijalva/jwt-go"
jwt "github.com/vladimiroff/jwt-go/v3"
)

var rsaPSSTestData = []struct {
Expand Down
3 changes: 2 additions & 1 deletion rsa_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package jwt_test

import (
"github.com/dgrijalva/jwt-go"
"io/ioutil"
"strings"
"testing"

jwt "github.com/vladimiroff/jwt-go/v3"
)

var rsaTestData = []struct {
Expand Down
3 changes: 2 additions & 1 deletion test/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package test

import (
"crypto/rsa"
"github.com/dgrijalva/jwt-go"
"io/ioutil"

jwt "github.com/vladimiroff/jwt-go/v3"
)

func LoadRSAPrivateKeyFromDisk(location string) *rsa.PrivateKey {
Expand Down

0 comments on commit f3f17e6

Please sign in to comment.