Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenResponse ¶
type TokenResponse struct {
T string
}
TokenResponse implementation for Basic authentication
func RequestToken ¶
func RequestToken(url, username, password string) (*TokenResponse, error)
RequestToken performs Basic authentication and extracts token from response header
func (TokenResponse) AuthHeader ¶
func (tr TokenResponse) AuthHeader() string
AuthHeader returns contents of the Authorization HTTP header
func (TokenResponse) ExpiresIn ¶
func (tr TokenResponse) ExpiresIn() int
ExpiresIn is set to 0 for Basic authentication
Click to show internal directories.
Click to hide internal directories.