/** * @param CredentialInterface $credential * * @return OwnContainerProvider */ public function addOwnCredential(CredentialInterface $credential) { if (null == $credential->getPrivateKey()) { throw new LightSamlBuildException('Own credential must have private key'); } $this->ownCredentials[] = $credential; return $this; }
/** * @param CredentialInterface $credential * * @return CredentialContainerProvider */ public function addExtraCredential(CredentialInterface $credential) { if (null === $credential->getEntityId()) { throw new \InvalidArgumentException('Extra credential must have entityID'); } $this->extraCredentials[] = $credential; return $this; }
/** * @param CredentialInterface $credential * * @return StaticCredentialStore */ public function add(CredentialInterface $credential) { $this->checkEntityIdExistence($credential->getEntityId()); $this->credentials[$credential->getEntityId()][] = $credential; return $this; }