Custom token provider not taken into account

When setting a custom token provider, it is not taken into account when
using the validation endpoint mode.