Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions config/saml2.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,18 @@

'proxyVars' => false,

/*
|--------------------------------------------------------------------------
| Whether to force the server self port
|--------------------------------------------------------------------------
|
| If 'serverPort' is setted will get this one - Good in case your Laravel
| application is behind a docker container using another port.
|
*/

'serverPort' => env('APP_PORT'),

/*
|--------------------------------------------------------------------------
| Service Provider configuration.
Expand Down
1 change: 0 additions & 1 deletion src/Http/Controllers/Saml2Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public function metadata(Auth $auth)
public function acs(Auth $auth)
{
$errors = $auth->acs();

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change isn't relevant to the PR.

if (!empty($errors)) {
$error = $auth->getLastErrorReason();
$uuid = $auth->getTenant()->uuid;
Expand Down
4 changes: 4 additions & 0 deletions src/OneLoginBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ public function bootstrap()
OneLoginUtils::setProxyVars(true);
}

if ($this->app['config']->get('saml2.serverPort')) {
OneLoginUtils::setSelfPort($this->app['config']->get('saml2.serverPort'));
}

$this->app->singleton('OneLogin_Saml2_Auth', function ($app) {
$config = $app['config']['saml2'];

Expand Down