Inheritance: extends Jose\Object\StorableInterface
 /**
  * {@inheritdoc}
  */
 protected function executeCommand(InputInterface $input, OutputInterface $output, RotatableInterface $jwkset)
 {
     $ttl = $input->getArgument('ttl');
     $date = new \DateTime();
     $interval = \DateInterval::createFromDateString($ttl);
     $date = $date->sub($interval);
     $mtime = $jwkset->getLastModificationTime();
     if (null === $mtime) {
         $jwkset->regen();
     } elseif ($mtime <= $date->getTimestamp()) {
         $jwkset->rotate();
     }
     return 0;
 }
 /**
  * {@inheritdoc}
  */
 protected function executeCommand(InputInterface $input, OutputInterface $output, RotatableInterface $jwkset)
 {
     $jwkset->delete();
     return 0;
 }
Ejemplo n.º 3
0
 /**
  * @param \Jose\Object\RotatableInterface $jwkset
  */
 private function createKeySetIfNeeded(RotatableInterface $jwkset)
 {
     if (null === $jwkset->getLastModificationTime()) {
         $jwkset->regen();
     }
 }