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

Function loadPublicKey

app/artifact-cas/internal/server/grpc.go:167–171  ·  view source on GitHub ↗

load key for verification

(rawKey []byte)

Source from the content-addressed store, hash-verified

165
166// load key for verification
167func loadPublicKey(rawKey []byte) jwt.Keyfunc {
168 return func(token *jwt.Token) (interface{}, error) {
169 return jwt.ParseECPublicKeyFromPEM(rawKey)
170 }
171}
172
173// Reimplementation of the kratos jwt middleware suited as stream interceptor
174func jwtAuthFunc(keyFunc jwt.Keyfunc, signingMethod jwt.SigningMethod) grpc_auth.AuthFunc {

Callers 2

NewGRPCServerFunction · 0.70
NewHTTPServerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected