Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node,rpc: JWT auth dialing + auth endpoints getters + auth testing #24911

Merged
merged 11 commits into from
Sep 2, 2022
Prev Previous commit
Next Next commit
rpc: add check for nil auth provider
  • Loading branch information
fjl committed Aug 31, 2022
commit c6222ac1552420fdd3bfede9c96a43091308c3ef
3 changes: 3 additions & 0 deletions rpc/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ func WithHTTPClient(c *http.Client) ClientOption {
// whenever a request is made. Note that only one authentication provider can be active at
// any time.
func WithHTTPAuth(a HeaderAuthProvider) ClientOption {
if a == nil {
panic("nil auth")
}
return optionFunc(func(cfg *clientConfig) {
cfg.httpAuth = a
})
Expand Down