docs: function register (options) {
    var self = this
    var url = this.configuration.registration_endpoint
    var token = options.token
    if (!options.redirect_uris) {
      throw new Error('Missing required redirect_uris parameter for registration')
    }
    var requestOptions = {
      url: url,
      method: 'POST',
      json: options,
      agentOptions: self.agentOptions
    }
    if (token) {
      requestOptions.headers = {
        'Authorization': 'Bearer ' + token
      }
    }
    if (self.proxy) {
      requestOptions.proxy = self.proxy
    }
    return Promise.resolve()
      .then(function () {
        return request(requestOptions)
      })
      .then(function (data) {
        self.client_id = data.client_id
        self.client_secret = data.client_secret
        self.registration = data
        return data
      })
  }