/**
  * Create a new OAuth2 authorization server
  *
  * @return self
  */
 public function __construct()
 {
     // Set Bearer as the default token type
     $this->setTokenType(new Bearer());
     parent::__construct();
     return $this;
 }
 /**
  * Initialise the resource server
  *
  * @param \League\OAuth2\Server\Storage\SessionInterface     $sessionStorage
  * @param \League\OAuth2\Server\Storage\AccessTokenInterface $accessTokenStorage
  * @param \League\OAuth2\Server\Storage\ClientInterface      $clientStorage
  * @param \League\OAuth2\Server\Storage\ScopeInterface       $scopeStorage
  *
  * @return self
  */
 public function __construct(SessionInterface $sessionStorage, AccessTokenInterface $accessTokenStorage, ClientInterface $clientStorage, ScopeInterface $scopeStorage)
 {
     $this->setSessionStorage($sessionStorage);
     $this->setAccessTokenStorage($accessTokenStorage);
     $this->setClientStorage($clientStorage);
     $this->setScopeStorage($scopeStorage);
     // Set Bearer as the default token type
     $this->setTokenType(new Bearer());
     parent::__construct();
     return $this;
 }