|
16 | 16 | * limitations under the License. |
17 | 17 | */ |
18 | 18 |
|
19 | | -use OpenConext\EngineBlock\Metadata\Loa; |
20 | | -use OpenConext\EngineBlock\Metadata\MfaEntity; |
21 | | -use OpenConext\EngineBlock\Metadata\TransparentMfaEntity; |
22 | | -use OpenConext\EngineBlockBundle\Authentication\AuthenticationState; |
23 | 19 | use OpenConext\EngineBlock\Metadata\Entity\AbstractRole; |
24 | 20 | use OpenConext\EngineBlock\Metadata\Entity\IdentityProvider; |
25 | 21 | use OpenConext\EngineBlock\Metadata\Entity\ServiceProvider; |
| 22 | +use OpenConext\EngineBlock\Metadata\Loa; |
| 23 | +use OpenConext\EngineBlock\Metadata\MetadataRepository\EntityNotFoundException; |
26 | 24 | use OpenConext\EngineBlock\Metadata\MetadataRepository\MetadataRepositoryInterface; |
| 25 | +use OpenConext\EngineBlock\Metadata\MfaEntity; |
27 | 26 | use OpenConext\EngineBlock\Metadata\Service; |
| 27 | +use OpenConext\EngineBlock\Metadata\TransparentMfaEntity; |
| 28 | +use OpenConext\EngineBlockBundle\Authentication\AuthenticationState; |
28 | 29 | use OpenConext\Value\Saml\Entity; |
29 | 30 | use OpenConext\Value\Saml\EntityId; |
30 | 31 | use OpenConext\Value\Saml\EntityType; |
@@ -416,8 +417,15 @@ public function sendAuthenticationRequest( |
416 | 417 | throw new EngineBlock_Corto_ProxyServer_Exception(sprintf('Unknown message type: "%s"', get_class($sspMessage))); |
417 | 418 | } |
418 | 419 |
|
| 420 | + try { |
| 421 | + $originalSpEnitytId = $this->findOriginalServiceProvider($spRequest, $this->_logger)->entityId; |
| 422 | + } catch (EntityNotFoundException $e) { |
| 423 | + // On debug requests, the entity ID can not be found in the database as this is the EngineBlock internal |
| 424 | + // entity which does not reside in the database. |
| 425 | + $originalSpEnitytId = $spEntityId; |
| 426 | + } |
419 | 427 | // Add authncontextclassref if configured |
420 | | - $service = $identityProvider->getCoins()->mfaEntities()->findByEntityId($this->findOriginalServiceProvider($spRequest, $this->_logger)->entityId); |
| 428 | + $service = $identityProvider->getCoins()->mfaEntities()->findByEntityId($originalSpEnitytId); |
421 | 429 | if ($service instanceof MfaEntity) { |
422 | 430 | $sspMessage->setRequestedAuthnContext([ |
423 | 431 | 'AuthnContextClassRef' => [ |
|
0 commit comments