Skip to content

Commit 8beb902

Browse files
authored
Merge pull request #898 from OpenConext/bugfix/cleanup-unused-destination
Clean up unused usage of authnrequest destination
2 parents 92782dd + aed608d commit 8beb902

File tree

3 files changed

+4
-17
lines changed

3 files changed

+4
-17
lines changed

library/EngineBlock/Corto/Module/Bindings.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,7 @@ public function receiveRequest()
183183
$_SESSION['currentServiceProvider'] = $ebRequest->getIssuer()->getValue();
184184

185185
// Verify that we know this SP and have metadata for it.
186-
$serviceProvider = $this->_verifyKnownSP(
187-
$spEntityId->getValue(),
188-
$ebRequest->getDestination()
189-
);
186+
$serviceProvider = $this->_verifyKnownSP($spEntityId->getValue());
190187

191188
if (!$serviceProvider instanceof ServiceProvider) {
192189
throw new EngineBlock_Corto_Module_Bindings_Exception(
@@ -513,11 +510,10 @@ protected function _receiveMessageFromInternalBinding($key)
513510
* Verify if a message has an issuer that is known as an SP to us. If not, it
514511
* throws a Corto_Module_Bindings_VerificationException.
515512
* @param string $messageIssuer
516-
* @param string $destination
517513
* @return AbstractRole Remote Entity that issued the message
518514
* @throws EngineBlock_Exception_UnknownServiceProvider
519515
*/
520-
protected function _verifyKnownSP(string $messageIssuer, string $destination = '')
516+
protected function _verifyKnownSP(string $messageIssuer)
521517
{
522518
$remoteEntity = $this->_server->getRepository()->findServiceProviderByEntityId($messageIssuer);
523519

@@ -534,8 +530,7 @@ protected function _verifyKnownSP(string $messageIssuer, string $destination = '
534530

535531
throw new EngineBlock_Exception_UnknownServiceProvider(
536532
sprintf('Issuer "%s" is not a known remote entity? (please add SP to Remote Entities)', $messageIssuer),
537-
$messageIssuer,
538-
$destination
533+
$messageIssuer
539534
);
540535
}
541536

library/EngineBlock/Exception/UnknownServiceProvider.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,15 @@
1919
class EngineBlock_Exception_UnknownServiceProvider extends Exception
2020
{
2121
private $_entityId;
22-
private $_destination;
2322

24-
function __construct($message, $entityId, $destination)
23+
function __construct($message, $entityId)
2524
{
2625
parent::__construct($message);
2726
$this->_entityId = $entityId;
28-
$this->_destination = $destination;
2927
}
3028

3129
public function getEntityId()
3230
{
3331
return $this->_entityId;
3432
}
35-
36-
public function getDestination()
37-
{
38-
return $this->_destination;
39-
}
4033
}

src/OpenConext/EngineBlockBundle/EventListener/RedirectToFeedbackPageExceptionListener.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ public function onKernelException(GetResponseForExceptionEvent $event)
160160

161161
$redirectParams = [
162162
'entity-id' => $exception->getEntityId(),
163-
'destination' => $exception->getDestination()
164163
];
165164
} elseif ($exception instanceof EngineBlock_Exception_UnknownIdentityProvider) {
166165
$message = 'Unknown Identity Provider';

0 commit comments

Comments
 (0)