MCPcopy
hub / github.com/dgraph-io/dgraph / GetJwtToken

Function GetJwtToken

graphql/authorization/auth.go:327–337  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

325}
326
327func GetJwtToken(ctx context.Context) string {
328 md, ok := metadata.FromIncomingContext(ctx)
329 if !ok {
330 return ""
331 }
332 jwtToken := md.Get(string(AuthJwtCtxKey))
333 if len(jwtToken) != 1 {
334 return ""
335 }
336 return jwtToken[0]
337}
338
339// validateThroughJWKUrl validates the JWT token against the given list of JWKUrls.
340// It returns an error only if the token is not validated against even one of the

Callers 2

sendWebhookEventFunction · 0.92
GetBodyForLambdaFunction · 0.92

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected