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

Function VerifySource

pkg/auth/cluster/cluster.go:53–56  ·  view source on GitHub ↗

VerifySource inspects whether the context contains one of the passed cluster keys, and returns a context containing the result.

(ctx context.Context, validKeys [][]byte)

Source from the content-addressed store, hash-verified

51// VerifySource inspects whether the context contains one of the passed cluster keys,
52// and returns a context containing the result.
53func VerifySource(ctx context.Context, validKeys [][]byte) context.Context {
54 err := verifySource(ctx, validKeys)
55 return NewContext(ctx, err)
56}
57
58func verifySource(ctx context.Context, validKeys [][]byte) error {
59 md := rpcmetadata.FromIncomingContext(ctx)

Callers 1

TestVerifyFunction · 0.92

Calls 2

verifySourceFunction · 0.85
NewContextFunction · 0.70

Tested by 1

TestVerifyFunction · 0.74