How to change timeout on UncompromisedVerifier/NotPwndVerifier #58275
Unanswered
blackwolf12333
asked this question in
Q&A
Replies: 1 comment
-
|
You need to overrride the ValidationServiceProvider and override: protected function registerUncompromisedVerifier()
{
$this->app->singleton(UncompromisedVerifier::class, function ($app) {
return new NotPwnedVerifier($app[HttpFactory::class]);
});
}to protected function registerUncompromisedVerifier()
{
$this->app->singleton(UncompromisedVerifier::class, function ($app) {
return new NotPwnedVerifier($app[HttpFactory::class], 10);
});
}See this as an example You need to replace the ValidationServiceProvider with your ChildValidationServiceProvider in the application. For lumen: $app->register(ChildValidationServiceProvider::class);For Laravel: 'providers' => [
ChildValidationServiceProvider::class,For V >11 you have to search how to do that. A solution would be to edit the config/app.php 'providers' => ServiceProvider::defaultProviders()->merge([into 'providers' => ChildServiceProvider::defaultProviders()->merge([And in the ChildServiceProvider |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
We implemented the
UncompromisedVerifierin our login/registration forms to check passwords against haveibeenpwnd. However the default timeout for requests to that API is 30 seconds which is a bit much for a login/registration flow so we'd like to decrease that. TheNotPwndVerifierconcrete implementation has a parameter for the timeout, but I couldn't find a way to actually configure that.How do I configure the timeout for the
NotPwndVerifier?Beta Was this translation helpful? Give feedback.
All reactions