MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / generateValidToken

Function generateValidToken

pkg/middlewares/http/jwt_test.go:37–41  ·  view source on GitHub ↗

Helper function to generate a valid token with custom claims

()

Source from the content-addressed store, hash-verified

35
36// Helper function to generate a valid token with custom claims
37func generateValidToken() string {
38 token := jwt.NewWithClaims(mockSigningMethod, jwt.MapClaims{"foo": "bar"})
39 tokenString, _ := token.SignedString([]byte("secret"))
40 return tokenString
41}
42
43func genericClaimsFunc() ClaimsFunc {
44 return func() jwt.Claims {

Callers 2

TestAuthFromQueryParamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected