Skip to content

Commit

Permalink
Adds number parsing to ttl, refresh_ttl, blacklist_grace_period and l…
Browse files Browse the repository at this point in the history
…eeway that comes from .env
  • Loading branch information
RBFraphael committed May 21, 2024
1 parent 51620eb commit 8164ca6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Providers/AbstractServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ protected function registerJWTBlacklist()
$this->app->singleton('tymon.jwt.blacklist', function ($app) {
$instance = new Blacklist($app['tymon.jwt.provider.storage']);

return $instance->setGracePeriod($this->config('blacklist_grace_period'))
->setRefreshTTL($this->config('refresh_ttl'));
return $instance->setGracePeriod(intval($this->config('blacklist_grace_period')))
->setRefreshTTL(intval($this->config('refresh_ttl')));
});
}

Expand All @@ -293,7 +293,7 @@ protected function registerPayloadValidator()
{
$this->app->singleton('tymon.jwt.validators.payload', function () {
return (new PayloadValidator)
->setRefreshTTL($this->config('refresh_ttl'))
->setRefreshTTL(intval($this->config('refresh_ttl')))
->setRequiredClaims($this->config('required_claims'));
});
}
Expand All @@ -309,8 +309,8 @@ protected function registerClaimFactory()
$factory = new ClaimFactory($app['request']);
$app->refresh('request', $factory, 'setRequest');

return $factory->setTTL($this->config('ttl'))
->setLeeway($this->config('leeway'));
return $factory->setTTL(intval($this->config('ttl')))
->setLeeway(intval($this->config('leeway')));
});
}

Expand Down

0 comments on commit 8164ca6

Please sign in to comment.