예제 #1
0
 public bool MustRefreshToken()
 {
     return(!string.IsNullOrEmpty(RefreshToken) && AccessTokenExpiry.CompareTo(DateTime.UtcNow) < 0);
 }
예제 #2
0
        public bool MustAuthenticate()
        {
            bool expiredButCannotRefresh = AccessTokenExpiry.CompareTo(DateTime.UtcNow) < 0 && !MustRefreshToken();

            return(!string.IsNullOrEmpty(AccessToken) || expiredButCannotRefresh);
        }