Skip to content

Commit

Permalink
Dependency update.
Browse files Browse the repository at this point in the history
  • Loading branch information
Micah Parks committed Aug 18, 2021
1 parent eb6533b commit 4fbee48
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 26 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
# keyfunc

Purpose of this package is to provide a
[`jwt.Keyfunc`](https://pkg.go.dev/github.com/golang-jwt/jwt#Keyfunc) for the
[github.com/golang-jwt/jwt](https://github.com/golang-jwt/jwt) package and its popular forks using a JSON Web Key Set
[`jwt.Keyfunc`](https://pkg.go.dev/github.com/golang-jwt/jwt/v4#Keyfunc) for the
[github.com/golang-jwt/jwt/v4](https://github.com/golang-jwt/jwt/v4) package and its popular forks using a JSON Web Key Set
(JWKs) for parsing and verifying JSON Web Tokens (JWTs). This
was [formally](https://github.com/dgrijalva/jwt-go/issues/462)
the [github.com/dgrijalva/jwt-go](https://github.com/dgrijalva/jwt-go) package.

It's common for an identity provider, such as [Keycloak](https://www.keycloak.org/)
or [Amazon Cognito (AWS)](https://aws.amazon.com/cognito/) to expose a JWKs via an HTTPS endpoint. This package has the
ability to consume that JWKs and produce a
[`jwt.Keyfunc`](https://pkg.go.dev/github.com/golang-jwt/jwt#Keyfunc). It is important that a JWKs
[`jwt.Keyfunc`](https://pkg.go.dev/github.com/golang-jwt/jwt/v4#Keyfunc). It is important that a JWKs
endpoint is using HTTPS to ensure the keys are from the correct trusted source.

This repository has the following dependencies:
* [github.com/golang-jwt/jwt](https://github.com/golang-jwt/jwt)
* [github.com/golang-jwt/jwt/v4](https://github.com/golang-jwt/jwt/v4)
* [github.com/dgrijalva/jwt-go](https://github.com/dgrijalva/jwt-go)
* [github.com/form3tech-oss/jwt-go](https://github.com/form3tech-oss/jwt-go)

Expand Down Expand Up @@ -95,7 +95,7 @@ Additional options can be passed to the [`keyfunc.Get`](https://pkg.go.dev/githu
via variadic arguments. See [`keyfunc.Options`](https://pkg.go.dev/github.com/MicahParks/keyfunc#Options) and the
additional features mentioned at the bottom of this `README.md`.

### Step 2: Use the [`keyfunc.JWKs`](https://pkg.go.dev/github.com/MicahParks/keyfunc#JWKs) 's [`JWKs.KeyFunc`](https://pkg.go.dev/github.com/MicahParks/keyfunc#JWKs.KeyFunc) method as the [`jwt.Keyfunc`](https://pkg.go.dev/github.com/golang-jwt/jwt#Keyfunc) when parsing tokens
### Step 2: Use the [`keyfunc.JWKs`](https://pkg.go.dev/github.com/MicahParks/keyfunc#JWKs) 's [`JWKs.KeyFunc`](https://pkg.go.dev/github.com/MicahParks/keyfunc#JWKs.KeyFunc) method as the [`jwt.Keyfunc`](https://pkg.go.dev/github.com/golang-jwt/jwt/v4#Keyfunc) when parsing tokens

```go
// Parse the JWT.
Expand All @@ -110,7 +110,7 @@ key with the matching `kid` (if present) and return its public key as the correc

## Fork support

Some packages use forks of [github.com/golang-jwt/jwt](https://github.com/golang-jwt/jwt). This package aims to support
Some packages use forks of [github.com/golang-jwt/jwt/v4](https://github.com/golang-jwt/jwt/v4). This package aims to support
the most popular use cases of these forks.

If additional forks are required for your use case, please feel free to open an issue or PR.
Expand Down Expand Up @@ -143,7 +143,7 @@ jwtMiddleware := jwtmiddleware.New(jwtmiddleware.Options{
This project originally only supported [github.com/dgrijalva/jwt-go](https://github.com/dgrijalva/jwt-go), but since it
is no longer maintained, it's method was moved
to [`JWKs.KeyFuncLegacy`](https://pkg.go.dev/github.com/MicahParks/keyfunc#JWKs.KeyFuncLegacy) if you have not moved to
[github.com/golang-jwt/jwt](https://github.com/golang-jwt/jwt) yet.
[github.com/golang-jwt/jwt/v4](https://github.com/golang-jwt/jwt/v4) yet.

## Test coverage

Expand Down
2 changes: 1 addition & 1 deletion examples/auth0middleware/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.16
require (
github.com/MicahParks/keyfunc v0.6.1
github.com/auth0/go-jwt-middleware v1.0.1
github.com/form3tech-oss/jwt-go v3.2.3+incompatible
github.com/form3tech-oss/jwt-go v3.2.5+incompatible
)

replace github.com/MicahParks/keyfunc => ../../
8 changes: 4 additions & 4 deletions examples/auth0middleware/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ github.com/auth0/go-jwt-middleware v1.0.1/go.mod h1:YSeUX3z6+TF2H+7padiEqNJ73Zy9
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c=
github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
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/form3tech-oss/jwt-go v3.2.5+incompatible h1:/l4kBbb4/vGSsdtB5nUe8L7B9mImVMaBPw9L/0TBHU8=
github.com/form3tech-oss/jwt-go v3.2.5+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
github.com/golang-jwt/jwt/v4 v4.0.0 h1:RAqyYixv1p7uEnocuy8P1nru5wprCh/MH2BIlW5z5/o=
github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 h1:l5lAOZEym3oK3SQ2HBHWsJUfbNBiTXJDeW2QDxw9AQ0=
github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
Expand Down
2 changes: 1 addition & 1 deletion examples/aws_cognito/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"time"

"github.com/golang-jwt/jwt"
"github.com/golang-jwt/jwt/v4"

"github.com/MicahParks/keyfunc"
)
Expand Down
2 changes: 1 addition & 1 deletion examples/ctx/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"log"
"time"

"github.com/golang-jwt/jwt"
"github.com/golang-jwt/jwt/v4"

"github.com/MicahParks/keyfunc"
)
Expand Down
2 changes: 1 addition & 1 deletion examples/interval/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"log"
"time"

"github.com/golang-jwt/jwt"
"github.com/golang-jwt/jwt/v4"

"github.com/MicahParks/keyfunc"
)
Expand Down
2 changes: 1 addition & 1 deletion examples/json/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"log"

"github.com/golang-jwt/jwt"
"github.com/golang-jwt/jwt/v4"

"github.com/MicahParks/keyfunc"
)
Expand Down
2 changes: 1 addition & 1 deletion examples/keycloak/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"log"

"github.com/golang-jwt/jwt"
"github.com/golang-jwt/jwt/v4"

"github.com/MicahParks/keyfunc"
)
Expand Down
2 changes: 1 addition & 1 deletion examples/recommended_options/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"log"
"time"

"github.com/golang-jwt/jwt"
"github.com/golang-jwt/jwt/v4"

"github.com/MicahParks/keyfunc"
)
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ go 1.13

require (
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/form3tech-oss/jwt-go v3.2.3+incompatible
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/form3tech-oss/jwt-go v3.2.5+incompatible
github.com/golang-jwt/jwt/v4 v4.0.0
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c=
github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
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/form3tech-oss/jwt-go v3.2.5+incompatible h1:/l4kBbb4/vGSsdtB5nUe8L7B9mImVMaBPw9L/0TBHU8=
github.com/form3tech-oss/jwt-go v3.2.5+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
github.com/golang-jwt/jwt/v4 v4.0.0 h1:RAqyYixv1p7uEnocuy8P1nru5wprCh/MH2BIlW5z5/o=
github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
2 changes: 1 addition & 1 deletion jwks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"testing"
"time"

"github.com/golang-jwt/jwt"
"github.com/golang-jwt/jwt/v4"

"github.com/MicahParks/keyfunc"
)
Expand Down
2 changes: 1 addition & 1 deletion keyfunc.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

legacy "github.com/dgrijalva/jwt-go"
f3t "github.com/form3tech-oss/jwt-go"
"github.com/golang-jwt/jwt"
"github.com/golang-jwt/jwt/v4"
)

var (
Expand Down

0 comments on commit 4fbee48

Please sign in to comment.