File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,9 +6,10 @@ import (
66 "testing"
77 "time"
88
9+ "github.com/golang-jwt/jwt/v4"
10+
911 "github.com/TykTechnologies/tyk/test"
1012 "github.com/TykTechnologies/tyk/user"
11- "github.com/golang-jwt/jwt/v4"
1213)
1314
1415// TestJWTNestedSubjectClaimSingleLevel tests nested subject claim with single level nesting
@@ -394,7 +395,10 @@ func TestJWTNestedClaims_CustomerScenario(t *testing.T) {
394395 token .Claims .(jwt.MapClaims )["iss" ] = "https://customer-idp.com"
395396 token .Claims .(jwt.MapClaims )["exp" ] = time .Now ().Add (time .Hour * 72 ).Unix ()
396397
397- tokenString , _ := token .SignedString ([]byte ("mysecret" ))
398+ tokenString , err := token .SignedString ([]byte ("mysecret" ))
399+ if err != nil {
400+ t .Fatalf ("Failed to sign token: %v" , err )
401+ }
398402
399403 authHeaders := map [string ]string {"authorization" : tokenString }
400404
You can’t perform that action at this time.
0 commit comments