public function init()
 {
     $sessionStorage = new SessionStorage();
     $accessTokenStorage = new AccessTokenStorage();
     $clientStorage = new ClientStorage();
     $scopeStorage = new ScopeStorage();
     $this->server = new ResourceServer($sessionStorage, $accessTokenStorage, $clientStorage, $scopeStorage);
     parent::init();
 }
 public function init()
 {
     $this->server = new AuthorizationServer();
     $this->server->setSessionStorage(new SessionStorage());
     $this->server->setAccessTokenStorage(new AccessTokenStorage());
     $this->server->setClientStorage(new ClientStorage());
     $this->server->setScopeStorage(new ScopeStorage());
     $token_expiration = isset(Yii::$app->params["oauth_token_expiration"]) ? Yii::$app->params["oauth_token_expiration"] : self::OAUTH_TOKEN_EXPIRATION;
     $this->server->setAccessTokenTTL($token_expiration);
     parent::init();
 }