inflateClaims 'inflates' a jwt.MapClaims from a seed by adding a ridiculously large key-value pair of length size.
(t testing.TB, seed jwt.MapClaims, size int)
| 3091 | // inflateClaims 'inflates' a jwt.MapClaims from a seed by |
| 3092 | // adding a ridiculously large key-value pair of length size. |
| 3093 | func inflateClaims(t testing.TB, seed jwt.MapClaims, size int) jwt.MapClaims { |
| 3094 | t.Helper() |
| 3095 | junk, err := cryptorand.String(size) |
| 3096 | require.NoError(t, err) |
| 3097 | seed["random_data"] = junk |
| 3098 | return seed |
| 3099 | } |
| 3100 | |
| 3101 | // generateBadJWT generates a JWT with a random key. It's intended to emulate the old-style JWT's we generated. |
| 3102 | func generateBadJWT(t *testing.T, claims interface{}) string { |
no test coverage detected