Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Commit

Permalink
Support authentication with passwords that contain a colon (#41)
Browse files Browse the repository at this point in the history
Co-authored-by: Pascal Hofmann <[email protected]>
  • Loading branch information
pascal-hofmann and pascal-hofmann authored Apr 12, 2020
1 parent 5cf70a2 commit cd94108
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func New(auth, baseURL string) (*Client, error) {
}
key := ""
if strings.Contains(auth, ":") {
split := strings.Split(auth, ":")
split := strings.SplitN(auth, ":", 2)
u.User = url.UserPassword(split[0], split[1])
} else {
key = fmt.Sprintf("Bearer %s", auth)
Expand Down

0 comments on commit cd94108

Please sign in to comment.