MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / tokenContext

Function tokenContext

pkg/ratelimit/util_test.go:27–31  ·  view source on GitHub ↗
(authTokenID string)

Source from the content-addressed store, hash-verified

25const authTokenID = "my-token-id"
26
27func tokenContext(authTokenID string) context.Context {
28 return metadata.NewIncomingContext(test.Context(), metadata.Pairs(
29 "authorization", fmt.Sprintf("Bearer NNSXS.%s.authTokenKey", authTokenID),
30 ))
31}

Callers 2

TestGRPCFunction · 0.85
TestHTTPFunction · 0.85

Calls 1

ContextFunction · 0.92

Tested by

no test coverage detected