summaryrefslogtreecommitdiff
path: root/pkg/vpn/bonafide/auth_sip.go
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2020-02-26 19:17:16 +0100
committerkali kaneko (leap communications) <kali@leap.se>2020-08-20 20:27:43 +0200
commit249a8844b1aaf2cd2bf6fddc8da10a4defb656d2 (patch)
tree49f97e20379cb0bdbe97b3d5481ebba2c66e645f /pkg/vpn/bonafide/auth_sip.go
parentc56df01274a91ff730018dcd6272423a3e1593f0 (diff)
[bug] use the right http client to fetch the auth
Diffstat (limited to 'pkg/vpn/bonafide/auth_sip.go')
-rw-r--r--pkg/vpn/bonafide/auth_sip.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/vpn/bonafide/auth_sip.go b/pkg/vpn/bonafide/auth_sip.go
index 1bfef52..1f200bb 100644
--- a/pkg/vpn/bonafide/auth_sip.go
+++ b/pkg/vpn/bonafide/auth_sip.go
@@ -19,7 +19,6 @@ import (
"encoding/json"
"fmt"
"io/ioutil"
- "net/http"
"strings"
)
@@ -41,7 +40,7 @@ func (a *sipAuthentication) getToken(user, password string) ([]byte, error) {
if err != nil {
return nil, fmt.Errorf("Cannot encode credentials: %s", err)
}
- resp, err := http.Post(a.authURI, "text/json", strings.NewReader(credJSON))
+ resp, err := a.client.Post(a.authURI, "text/json", strings.NewReader(credJSON))
if err != nil {
return nil, fmt.Errorf("Error on auth request: %v", err)
}