public function redirect()
{
if (!$this->isStateless()) {
$this->request->getSession()->set('oauth.temp', $temp = $this->server->getTemporaryCredentials());
} else {
$temp = $this->server->getTemporaryCredentials();
$this->request->session()->set('oauth_temp', serialize($temp));
}
return new RedirectResponse($this->server->getAuthorizationUrl($temp));
}