MCPcopy Index your code
hub / github.com/coder/coder / newKey

Function newKey

coderd/jwtutils/jwt_test.go:402–413  ·  view source on GitHub ↗
(t *testing.T, size int)

Source from the content-addressed store, hash-verified

400}
401
402func newKey(t *testing.T, size int) *key {
403 t.Helper()
404
405 id := uuid.New().String()
406 secret := generateSecret(t, size)
407
408 return &key{
409 t: t,
410 id: id,
411 secret: secret,
412 }
413}
414
415func (k *key) SigningKey(_ context.Context) (id string, key interface{}, err error) {
416 return k.id, k.secret, nil

Callers 3

TestClaimsFunction · 0.85
TestJWSFunction · 0.85
TestJWEFunction · 0.85

Calls 4

generateSecretFunction · 0.70
HelperMethod · 0.65
NewMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected