Explorar o código

setup a 15' expiration delay to captcha challenge

olinox14 hai 1 ano
pai
achega
1072717278
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/State/Provider/ChallengeProvider.php

+ 2 - 1
src/State/Provider/ChallengeProvider.php

@@ -29,7 +29,8 @@ class ChallengeProvider implements ProviderInterface
 
         $options = new ChallengeOptions([
             'hmacKey'   => $this->hmacKey,
-            'maxNumber' => 100000
+            'maxNumber' => 100000,
+            'expires' => (new \DateTime())->modify('+15 minute')
         ]);
 
         return Altcha::createChallenge($options);