Skip to content

Commit

Permalink
SSO URL should not lead to the API host.
Browse files Browse the repository at this point in the history
  • Loading branch information
biozshock committed Jun 10, 2022
1 parent 7e1d764 commit 2d3b9d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Helper/AudienceHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@ class AudienceHelper

private const TEST_AUDIENCE = 'https://uat.print-mailing-api-test.deutschepost.de';

private const FRONTEND = 'https://print-mailing.deutschepost.de';

public static function getAudience(): string
{
return MAUTIC_ENV === 'prod' ? self::AUDIENCE : self::TEST_AUDIENCE;
}

public static function getFrontend(): string
{
return self::FRONTEND;
}
}
2 changes: 1 addition & 1 deletion Utility/SingleSignOnUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct(CoreParametersHelper $coreParametersHelper, UserHelp
public function getSingleSignOnUrl(): string
{
if ($this->isValid()) {
return sprintf(self::SSO_URL, AudienceHelper::getAudience(), $this->generateJsonWebToken());
return sprintf(self::SSO_URL, AudienceHelper::getFrontend(), $this->generateJsonWebToken());
}

return '';
Expand Down

0 comments on commit 2d3b9d8

Please sign in to comment.