/**
  * Check access token
  *
  * @param  AccessTokenInterface $accessToken
  * @return void
  * @throws OAuthAccessTokenNotFoundException
  * @throws OAuthAccessTokenExpiredException
  */
 protected function checkAccessToken($accessToken)
 {
     if (empty($accessToken)) {
         throw new OAuthAccessTokenNotFoundException('The access token could not be found.', 401, null, $this->realmName);
     }
     if ($accessToken->isExpired()) {
         throw new OAuthAccessTokenExpiredException('The access token provided has expired.', 401, null, $this->realmName);
     }
     if ($accessToken->isRevoked()) {
         throw new OAuthAccessTokenExpiredException('The access token provided was revoked.', 401, null, $this->realmName);
     }
 }