title: Yii2 Auth Client Extension for Tumblr
body: <p>I'm trying to use the Auth Client Extension in Yii2 (<a href="http://www.yiiframework.com/doc-2.0/ext-authclient-index.html" rel="nofollow">http://www.yiiframework.com/doc-2.0/ext-authclient-index.html</a>). I've copied the Twitter Auth Client class that came with YiiFramework and made my own Tumblr version. Twitter works fine, but when I use my Tumblr version, I get an error on the screen after the "Is it alright for this application to access some of your data and make posts to your account? You are logged in as *********." (Tumblr oauth page)</p>
  
  <p>There error is: Request failed with code: 401, message: oauth_signature does not match expected value</p>
  
  <p>Here is my Tumblr auth client code:</p>
  
  <p><pre><code>
  namespace yii\authclient\clients;</p>
  
  <p>use yii\authclient\OAuth1;</p>
  
  <p>/**
   *
   * Example application configuration:
   *
   * ~~~
   * 'components' => [
   *     'authClientCollection' => [
   *         'class' => 'yii\authclient\Collection',
   *         'clients' => [
   *             'tumblr' => [
   *                 'class' => 'yii\authclient\clients\Tumblr',
   *                 'consumerKey' => 'tumblr_consumer_key',
   *                 'consumerSecret' => 'tumblr_consumer_secret',
   *             ],
   *         ],
   *     ]
   *     ...
   * ]
   * ~~~
   *
   */
  class Tumblr extends OAuth1
  {
      /**
       * @inheritdoc
       */
      public $authUrl = '<a href="https://www.tumblr.com/oauth/authorize" rel="nofollow">https://www.tumblr.com/oauth/authorize</a>';
      /**
       * @inheritdoc
       */
      public $requestTokenUrl = '<a href="https://www.tumblr.com/oauth/request_token" rel="nofollow">https://www.tumblr.com/oauth/request_token</a>';
      /**
       * @inheritdoc
       */
      public $requestTokenMethod = 'POST';
      /**
       * @inheritdoc
       */
      public $accessTokenUrl = '<a href="https://www.tumblr.com/oauth/access_token" rel="nofollow">https://www.tumblr.com/oauth/access_token</a>';
      /**
       * @inheritdoc
       */
      public $accessTokenMethod = 'GET';
      /**
       * @inheritdoc
       */
      public $apiBaseUrl = '<a href="http://api.tumblr.com/v2" rel="nofollow">http://api.tumblr.com/v2</a>';</p>
  
  <pre><code>/**
   * @inheritdoc
   */
  protected function initUserAttributes()
  {
      return $this-&gt;api('/user/info', 'GET');
  }
  
  /**
   * @inheritdoc
   */
  protected function defaultName()
  {
      return 'tumblr';
  }
  
  /**
   * @inheritdoc
   */
  protected function defaultTitle()
  {
      return 'Tumblr';
  }
  </code></pre>
  
  <p>}
  </pre></code></p>