code: func (auth *Auth) UnmarshalYAML(unmarshal func(interface{}) error) error {
  	var m map[string]Parameters
  	err := unmarshal(&m)
  	if err == nil {
  		if len(m) > 1 {
  			types := make([]string, 0, len(m))
  			for k := range m {
  				types = append(types, k)
  			}
  
  			// TODO(stevvooe): May want to change this slightly for
  			// authorization to allow multiple challenges.
  			return fmt.Errorf("must provide exactly one type. Provided: %v", types)
  
  		}
  		*auth = m
  		return nil
  	}
  
  	var authType string
  	err = unmarshal(&authType)
  	if err == nil {
  		*auth = Auth{authType: Parameters{}}
  		return nil
  	}
  
  	return err
  }
docs: // UnmarshalYAML implements the yaml.Unmarshaler interface
  // Unmarshals a single item map into a Storage or a string into a Storage type with no parameters