KnpU\OAuth2ClientBundle\Client\OAuth2Client::getSession PHP Method

getSession() private method

private getSession ( ) : null | Symfony\Component\HttpFoundation\Session\SessionInterface
return null | Symfony\Component\HttpFoundation\Session\SessionInterface
    private function getSession()
    {
        $session = $this->getCurrentRequest()->getSession();
        if (!$session) {
            throw new \LogicException('In order to use "state", you must have a session. Set the OAuth2Client to stateless to avoid state');
        }
        return $session;
    }