getAccessTokenIfValid

suspend fun getAccessTokenIfValid(): String?

Checks to see if the current access token is valid, and if it is, returns it. If there is no Token associated with the Credential, null is returned.

Access tokens are considered valid if they haven't expired.

See Credential.introspectToken for checking if the token is valid with the Authorization Server.