protected function getAuthorizationHeader($forceRefresh = false)
    {
        $token = $this->getAccessToken();

        // If we're using a token provided with the request, return it.
        if ($this->grant === 'provided_token') {
            return ['Authorization' => 'Bearer ' . $token->getToken()];
        }

        // Don't attempt to refresh token if there isn't a logged-in user.
        $user = $this->getFrameworkBridge()->getCurrentUser();
        if ($this->grant === 'authorization_code' && ! $user) {
            return [];
        }

        // If the token is expired, fetch a new one before making the request.
        if (! $token || ($token && $token->hasExpired()) || $forceRefresh) {
            $token = $this->refreshAccessToken($token);
        }

        return $this->getAuthorizationServer()->getHeaders($token);
    }