code: func (fp *ForwardProxy) checkCredentials(r *http.Request) error {
  	pa := strings.Split(r.Header.Get("Proxy-Authorization"), " ")
  	if len(pa) != 2 {
  		return errors.New("Proxy-Authorization is required! Expected format: <type> <credentials>")
  	}
  	if strings.ToLower(pa[0]) != "basic" {
  		return errors.New("Auth type is not supported")
  	}
  	for _, creds := range fp.authCredentials {
  		if subtle.ConstantTimeCompare(creds, []byte(pa[1])) == 1 {
  			// Please do not consider this to be timing-attack-safe code. Simple equality is almost
  			// mindlessly substituted with constant time algo and there ARE known issues with this code,
  			// e.g. size of smallest credentials is guessable. TODO: protect from all the attacks! Hash?
  			return nil
  		}
  	}
  	return errors.New("Invalid credentials")
  }
docs: // Returns nil error on successful credentials check.