mirror of
https://github.com/documize/community.git
synced 2025-07-24 23:59:47 +02:00
upgraded vendored jwt-go lib
This commit is contained in:
parent
b5f85637a7
commit
8aeb3eaec4
34 changed files with 1752 additions and 341 deletions
6
vendor/github.com/dgrijalva/jwt-go/rsa_test.go
generated
vendored
6
vendor/github.com/dgrijalva/jwt-go/rsa_test.go
generated
vendored
|
@ -45,7 +45,8 @@ var rsaTestData = []struct {
|
|||
}
|
||||
|
||||
func TestRSAVerify(t *testing.T) {
|
||||
key, _ := ioutil.ReadFile("test/sample_key.pub")
|
||||
keyData, _ := ioutil.ReadFile("test/sample_key.pub")
|
||||
key, _ := jwt.ParseRSAPublicKeyFromPEM(keyData)
|
||||
|
||||
for _, data := range rsaTestData {
|
||||
parts := strings.Split(data.tokenString, ".")
|
||||
|
@ -62,7 +63,8 @@ func TestRSAVerify(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestRSASign(t *testing.T) {
|
||||
key, _ := ioutil.ReadFile("test/sample_key")
|
||||
keyData, _ := ioutil.ReadFile("test/sample_key")
|
||||
key, _ := jwt.ParseRSAPrivateKeyFromPEM(keyData)
|
||||
|
||||
for _, data := range rsaTestData {
|
||||
if data.valid {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue