Example #1
0
 /**
  * @param AssertionConsumerService $assertionConsumerService
  *
  * @return SpSsoDescriptor
  */
 public function addAssertionConsumerService(AssertionConsumerService $assertionConsumerService)
 {
     if (false == is_array($this->assertionConsumerServices)) {
         $this->assertionConsumerServices = array();
     }
     if (null === $assertionConsumerService->getIndex()) {
         $assertionConsumerService->setIndex(count($this->assertionConsumerServices));
     }
     $this->assertionConsumerServices[] = $assertionConsumerService;
     return $this;
 }
 /**
  * @return SpSsoDescriptor|null
  */
 protected function getSpSsoDescriptor()
 {
     if (null === $this->acsUrl) {
         return null;
     }
     $spSso = new SpSsoDescriptor();
     foreach ($this->acsBindings as $index => $biding) {
         $acs = new AssertionConsumerService();
         $acs->setIndex($index)->setLocation($this->acsUrl)->setBinding($biding);
         $spSso->addAssertionConsumerService($acs);
     }
     $this->addKeyDescriptors($spSso);
     return $spSso;
 }