MCPcopy Create free account
hub / github.com/couchbase/cbft / wrapAuthCallbacks

Function wrapAuthCallbacks

grpc_auth.go:32–40  ·  view source on GitHub ↗

wrapAuthCallbacks embeds the right authentication callbacks into the context.

(req interface{},
	ctx context.Context, rpcPath string)

Source from the content-addressed store, hash-verified

30// wrapAuthCallbacks embeds the right authentication callbacks
31// into the context.
32func wrapAuthCallbacks(req interface{},
33 ctx context.Context, rpcPath string) (newCtx context.Context, err error) {
34 newCtx, err = tryBasicAuth(req, ctx, rpcPath)
35 if err == nil {
36 return newCtx, nil
37 }
38
39 return ctx, err
40}
41
42func tryBasicAuth(req interface{}, ctx context.Context,
43 rpcPath string) (context.Context, error) {

Callers 1

serverInterceptorFunction · 0.85

Calls 1

tryBasicAuthFunction · 0.85

Tested by

no test coverage detected