protected function getAccessToken() {
    $cookies = $_COOKIE;

    if (isset(\Drupal::request()->cookies)) {
      $cookies = \Drupal::request()->cookies->all();
    }

    $cookie_name = 'Drupal_visitor_' . $this->accessTokenCookie;

    if (isset($cookies[$cookie_name])) {
      return $cookies[$cookie_name];
    }

    return NULL;
  }