(t *testing.T)
| 43 | } |
| 44 | |
| 45 | func TestNoneVerify(t *testing.T) { |
| 46 | for _, data := range noneTestData { |
| 47 | parts := strings.Split(data.tokenString, ".") |
| 48 | |
| 49 | method := jwt.GetSigningMethod(data.alg) |
| 50 | err := method.Verify(strings.Join(parts[0:2], "."), decodeSegment(t, parts[2]), data.key) |
| 51 | if data.valid && err != nil { |
| 52 | t.Errorf("[%v] Error while verifying key: %v", data.name, err) |
| 53 | } |
| 54 | if !data.valid && err == nil { |
| 55 | t.Errorf("[%v] Invalid key passed validation", data.name) |
| 56 | } |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | func TestNoneSign(t *testing.T) { |
| 61 | for _, data := range noneTestData { |
nothing calls this directly
no test coverage detected