wrapAuthCallbacks embeds the right authentication callbacks into the context.
(req interface{},
ctx context.Context, rpcPath string)
| 30 | // wrapAuthCallbacks embeds the right authentication callbacks |
| 31 | // into the context. |
| 32 | func 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 | |
| 42 | func tryBasicAuth(req interface{}, ctx context.Context, |
| 43 | rpcPath string) (context.Context, error) { |
no test coverage detected