SAML2\Configuration\ServiceProvider::getEntityId PHP Method

getEntityId() public method

public getEntityId ( )
    public function getEntityId()
    {
        return $this->get('entityId');
    }

Usage Example

コード例 #1
0
ファイル: SpIsValidAudience.php プロジェクト: SysBind/saml2
 public function validate(Assertion $assertion, Result $result)
 {
     $intendedAudiences = $assertion->getValidAudiences();
     if ($intendedAudiences === null) {
         return;
     }
     $entityId = $this->serviceProvider->getEntityId();
     if (!in_array($entityId, $intendedAudiences)) {
         $result->addError(sprintf('The configured Service Provider [%s] is not a valid audience for the assertion. Audiences: [%s]', $entityId, implode('], [', $intendedAudiences)));
     }
 }