)
func newArvadosClient() interface{} {
- // MakeArvadosClient returns an error if token is unset (even
- // though we don't need to do anything requiring
- // authentication yet).
- os.Setenv("ARVADOS_API_TOKEN", "xxx")
arv, err := arvadosclient.MakeArvadosClient()
if err != nil {
log.Println("MakeArvadosClient:", err)
// HTTP request username is logged, but unused. Password is an
// Arvados API token.
- username, password, ok := r.BasicAuth()
+ username, password, ok := BasicAuth(r)
if !ok || username == "" || password == "" {
statusCode, statusText = http.StatusUnauthorized, "no credentials provided"
w.Header().Add("WWW-Authenticate", "basic")