Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sail port #68

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
Collaborator

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