How to validate and Generate new Token

I am using Tuupola\Middleware\JwtAuthentication. Is there any way to validate token expiry and regenerate new token?

In my opinion, in good practice, you need to create 2 methods to check and regenerate(update) the token.