Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
activate usage of proxy vars if symfony detects a trusted one
- Loading branch information
1 parent
b2868f9
commit 04223e0
Showing
6 changed files
with
48 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Kimai time-tracking app. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace App\Saml; | ||
|
||
use OneLogin\Saml2\Auth; | ||
use OneLogin\Saml2\Utils; | ||
use Symfony\Component\HttpFoundation\RequestStack; | ||
|
||
class SamlAuth extends Auth | ||
{ | ||
public function __construct(RequestStack $request, array $settings = null) | ||
{ | ||
parent::__construct($settings); | ||
|
||
if (null !== $request->getMasterRequest() && $request->getMasterRequest()->isFromTrustedProxy()) { | ||
Utils::setProxyVars(true); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters