code: func (c *Client) CreateAuthorization(opts CreateAuthorizationOptions) (*Authorization, error) {
  	f := struct {
  		Scopes       []string `json:"scopes"`
  		ClientID     string   `json:"client_id"`
  		ClientSecret string   `json:"client_secret"`
  	}{
  		Scopes:       c.Scopes,
  		ClientID:     c.ClientID,
  		ClientSecret: c.ClientSecret,
  	}
  
  	req, err := c.NewRequest("POST", "/authorizations", f)
  	if err != nil {
  		return nil, err
  	}
  
  	req.SetBasicAuth(opts.Username, opts.Password)
  
  	// If a two factor auth code is present, set the `X-GitHub-OTP` header
  	// value. See http://goo.gl/Lumn6s.
  	if opts.OTP != "" {
  		req.Header.Set(HeaderTwoFactor, opts.OTP)
  	}
  
  	var a Authorization
  	resp, err := c.Do(req, &a)
  	if err != nil {
  		if resp != nil && resp.StatusCode == 401 {
  			// When the `X-GitHub-OTP` header is present in the response, it means
  			// a two factor auth code needs to be provided.
  			if resp.Header.Get(HeaderTwoFactor) != "" {
  				return nil, errTwoFactor
  			}
  
  			return nil, errUnauthorized
  		}
  
  		return nil, err
  	}
  
  	if a.Token == "" {
  		return nil, errNoToken
  	}
  
  	return &a, nil
  }
docs: // CreateAuthorization creates a new GitHub authorization (or returns the
  // existing authorization if present) for the GitHub OAuth application. See
  // http://goo.gl/bs9I3o.