public function run()
 {
     $request = \Yii::$app->request;
     $grantType = GrantTypeAbstract::createGrantType(['accessTokenLifetime' => $this->accessTokenLifetime, 'refreshTokenLifetime' => $this->refreshTokenLifetime]);
     $grantType->validate();
     \Yii::$app->response->data = $grantType->getResponseData();
 }
 public function validateRedirect_uri($attribute, $params)
 {
     $authCode = $this->getAuthCode();
     if ($authCode->redirect_uri && strcasecmp($this->{$attribute}, $authCode->redirect_uri) !== 0) {
         $this->errorServer('The redirect URI provided does not match', Exception::REDIRECT_URI_MISMATCH);
     }
     parent::validateRedirect_uri($attribute, $params);
 }