support Basic auth #8

Closed
jmazzitelli opened this Issue Oct 17, 2016 · 1 comment

Projects

None yet

1 participant

@jmazzitelli
Contributor

in client.go I see this:
if len(c.Token) > 0 {
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", c.Token))

This supports Bearer tokens. But no support for Basic auth.

We should add a "Username" and "Password" in the Parameters object. If they are specified, then add a "Basic" header. If they are not specified, but token is, then do what we are already doing (add a Bearer header). If neither are specified, do nothing.

@jmazzitelli jmazzitelli added a commit to jmazzitelli/hawkular-client-go that referenced this issue Oct 17, 2016
@jmazzitelli jmazzitelli issue #8 - add support for Basic auth 1b19772
@jmazzitelli jmazzitelli added a commit to jmazzitelli/hawkular-client-go that referenced this issue Oct 18, 2016
@jmazzitelli jmazzitelli issue #8 - add support for Basic auth bce2cf9
@jmazzitelli
Contributor

this can be closed PR #9 addresses this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment