From 43da887405981b3e60a35d65267e56b1af705b03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Ja=CC=88ger?= Date: Mon, 26 Aug 2013 23:22:21 +0200 Subject: [PATCH] expose options to be able to set server_url and app_url based on request --- .../EntryPoint/FacebookAuthenticationEntryPoint.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Security/EntryPoint/FacebookAuthenticationEntryPoint.php b/Security/EntryPoint/FacebookAuthenticationEntryPoint.php index b250a77..3023c93 100644 --- a/Security/EntryPoint/FacebookAuthenticationEntryPoint.php +++ b/Security/EntryPoint/FacebookAuthenticationEntryPoint.php @@ -58,18 +58,23 @@ public function start(Request $request, AuthenticationException $authException = if ($this->options->get('server_url') && $this->options->get('app_url')) { $redirect_uri = str_replace($this->options->get('server_url'), $this->options->get('app_url'), $redirect_uri); } - + $loginUrl = $this->facebook->getLoginUrl( array( 'display' => $this->options->get('display', 'page'), 'scope' => implode(',', $this->permissions), 'redirect_uri' => $redirect_uri, )); - + if ($this->options->get('server_url') && $this->options->get('app_url')){ return new Response(''); } - + return new RedirectResponse($loginUrl); } + + public function getOptions() + { + return $this->options; + } }