code: func (s *CredentialHelpers) Approve(what Creds) error {
  	skipped := make(map[int]bool)
  	for i, h := range s.helpers {
  		if s.skipped(i) {
  			skipped[i] = true
  			continue
  		}
  
  		if err := h.Approve(what); err != credHelperNoOp {
  			if err != nil && i > 0 { // clear any cached approvals
  				for j := 0; j < i; j++ {
  					if !skipped[j] {
  						s.helpers[j].Reject(what)
  					}
  				}
  			}
  			return err
  		}
  	}
  
  	return errors.New("no valid credential helpers to approve")
  }
docs: // Approve implements CredentialHelper.Approve and approves the given Creds
  // "what" with the first successful CredentialHelper. If an error occurrs,
  // it calls Reject() with the same Creds and returns the error immediately. This
  // ensures a caching credential helper removes the cache, since the Erroring
  // CredentialHelper never successfully saved it.