added addOnTokenExpiring to TokenManager