Skip to content

Commit

Permalink
Merge pull request #20 from tranvan538/SupportBasicAuth
Browse files Browse the repository at this point in the history
Add public get functions for basicAuth, basicAuthUser, basicAuthPassword
  • Loading branch information
cy-kaneko committed Dec 22, 2017
2 parents 4cf2d24 + df9bfeb commit 021bd2f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,21 @@ func (app *App) SetBasicAuth(user, password string) {
app.basicAuthPassword = password
}

// HasBasicAuth indicate authentication is basic or not
func (app *App) HasBasicAuth() bool {
return app.basicAuth
}

// GetBasicAuthUser return username string for basic authentication
func (app *App) GetBasicAuthUser() string {
return app.basicAuthUser
}

// GetBasicAuthPassword return password string for basic authentication
func (app *App) GetBasicAuthPassword() string {
return app.basicAuthPassword
}

// SetUserAgentHeader set custom user-agent header for http request
func (app *App) SetUserAgentHeader(userAgentHeader string) {
app.userAgentHeader = userAgentHeader
Expand Down

0 comments on commit 021bd2f

Please sign in to comment.