-
-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1758 from umputun/paskal/jwt_v5
Update to go-pkgz/auth/v2 and golang-jwt/jwt/v5
- Loading branch information
Showing
80 changed files
with
2,127 additions
and
1,829 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,10 @@ import ( | |
"time" | ||
|
||
"github.com/go-chi/render" | ||
"github.com/go-pkgz/auth/token" | ||
"github.com/go-pkgz/auth/v2/token" | ||
"github.com/go-pkgz/lgr" | ||
R "github.com/go-pkgz/rest" | ||
"github.com/golang-jwt/jwt" | ||
"github.com/golang-jwt/jwt/v5" | ||
"github.com/stretchr/testify/assert" | ||
"github.com/stretchr/testify/require" | ||
|
||
|
@@ -861,10 +861,10 @@ func TestRest_EmailAndTelegram(t *testing.T) { | |
// issue good token | ||
claims := token.Claims{ | ||
Handshake: &token.Handshake{ID: "provider1_dev::[email protected]"}, | ||
StandardClaims: jwt.StandardClaims{ | ||
Audience: "remark42", | ||
ExpiresAt: time.Now().Add(10 * time.Minute).Unix(), | ||
NotBefore: time.Now().Add(-1 * time.Minute).Unix(), | ||
RegisteredClaims: jwt.RegisteredClaims{ | ||
Audience: jwt.ClaimStrings{"remark42"}, | ||
ExpiresAt: jwt.NewNumericDate(time.Now().Add(10 * time.Minute)), | ||
NotBefore: jwt.NewNumericDate(time.Now().Add(-1 * time.Minute)), | ||
Issuer: "remark42", | ||
}, | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.