hasValidToken

fun TokenSourceResponse.hasValidToken(tolerance: Duration = 60.seconds, date: Date = Date()): Boolean

Validates whether the JWT token is still valid.

Parameters

tolerance

a token expiring within this duration is treated as already expired, so a fresh one is fetched before it is used to connect.

date

the point in time to validate against.