Beispiel #1
0
 /**
  * @group signature
  *
  * @test
  */
 public function it_uses_the_result_of_the_first_validator_that_can_validate()
 {
     $this->chain->appendValidator(new MockChainedValidator(false, true));
     $this->chain->appendValidator(new MockChainedValidator(true, false));
     $this->chain->appendValidator(new MockChainedValidator(false, true));
     $validationResult = $this->chain->hasValidSignature(new Response(), new IdentityProvider(array()));
     $this->assertFalse($validationResult, 'The validation result is not what is expected');
 }
Beispiel #2
0
 public function hasValidSignature(SignedElement $signedElement, CertificateProvider $configuration)
 {
     // should be DI
     $validator = new ValidatorChain($this->logger, array(new PublicKeyValidator($this->logger, new KeyLoader()), new FingerprintValidator($this->logger, new FingerprintLoader())));
     return $validator->hasValidSignature($signedElement, $configuration);
 }