aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport/http/common.go
diff options
context:
space:
mode:
authorJACQUES Francois <Francois.JACQUES@murex.com>2019-07-28 18:09:55 +0200
committerJACQUES Francois <Francois.JACQUES@murex.com>2019-07-28 18:11:17 +0200
commit361f21d9cc514d79924325c53d37bd097be3904d (patch)
treec56f72099d5fcf8010d74e5e8149508c47cc2001 /plumbing/transport/http/common.go
parent1edb992dbc419a0767b1cf3a524b0d35529799f5 (diff)
downloadgo-git-361f21d9cc514d79924325c53d37bd097be3904d.tar.gz
Make http.AuthMethod setAuth public. Fixes #1196
Signed-off-by: JACQUES Francois <Francois.JACQUES@murex.com>
Diffstat (limited to 'plumbing/transport/http/common.go')
-rw-r--r--plumbing/transport/http/common.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/plumbing/transport/http/common.go b/plumbing/transport/http/common.go
index 5d3535e..38e903d 100644
--- a/plumbing/transport/http/common.go
+++ b/plumbing/transport/http/common.go
@@ -139,7 +139,7 @@ func (s *session) ApplyAuthToRequest(req *http.Request) {
return
}
- s.auth.setAuth(req)
+ s.auth.SetAuth(req)
}
func (s *session) ModifyEndpointIfRedirect(res *http.Response) {
@@ -175,7 +175,7 @@ func (*session) Close() error {
// AuthMethod is concrete implementation of common.AuthMethod for HTTP services
type AuthMethod interface {
transport.AuthMethod
- setAuth(r *http.Request)
+ SetAuth(r *http.Request)
}
func basicAuthFromEndpoint(ep *transport.Endpoint) *BasicAuth {
@@ -192,7 +192,7 @@ type BasicAuth struct {
Username, Password string
}
-func (a *BasicAuth) setAuth(r *http.Request) {
+func (a *BasicAuth) SetAuth(r *http.Request) {
if a == nil {
return
}
@@ -226,7 +226,7 @@ type TokenAuth struct {
Token string
}
-func (a *TokenAuth) setAuth(r *http.Request) {
+func (a *TokenAuth) SetAuth(r *http.Request) {
if a == nil {
return
}