Skip to content

Commit 202ffbd

Browse files
committedMar 28, 2018
# Conflicts: # composer.json
2 parents cb76109 + e03a865 commit 202ffbd

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed
 

‎Controller/Controller.php

+17-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,26 @@
22

33
namespace Webnet\SsoAuthBundle\Controller;
44

5-
use Symfony\Component\DependencyInjection\ContainerAware;
5+
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
66
use Symfony\Component\DependencyInjection\ContainerInterface;
77

8-
class Controller extends ContainerAware
8+
class Controller implements ContainerAwareInterface
99
{
10+
/**
11+
* @var ContainerInterface $container
12+
*/
13+
private $container;
14+
15+
/**
16+
* Sets the container.
17+
*
18+
* @param ContainerInterface|null $container A ContainerInterface instance or null
19+
*/
20+
public function setContainer(ContainerInterface $container = null)
21+
{
22+
$this->container=$container;
23+
}
24+
1025
protected function render($view, array $parameters)
1126
{
1227
return $this

‎Resources/doc/example.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ In config.yml:
1919
id: cas
2020
login_url: https://cas.server.tld/login
2121
logout_url: https://cas.server.tld/logout
22+
logout_target: '%logout_target_url%'
2223
validation_url: https://cas.server.tld/serviceValidate
2324

2425

‎Sso/Cas/Server.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@ public function getLoginUrl()
2424
*/
2525
public function getLogoutUrl()
2626
{
27-
$service = sprintf('service=%s', urlencode($this->getCheckUrl()));
28-
$url = $this->getLogoutTarget() ? sprintf('&url=%s', urlencode($this->getLogoutTarget())) : null;
27+
$service = sprintf('service=%s', urlencode($this->getLogoutTarget()));
2928

30-
return sprintf('%s?%s%s', parent::getLogoutUrl(), $service, $url);
29+
return sprintf('%s?%s', parent::getLogoutUrl(), $service);
3130
}
3231

3332
/**

0 commit comments

Comments
 (0)