ASPC.Marvel.CrimeAPI.SharePointContext.IsAccessTokenValid C# (CSharp) Method

IsAccessTokenValid() protected static method

Determines if the specified access token is valid. It considers an access token as not valid if it is null, or it has expired.
protected static IsAccessTokenValid ( DateTime>.Tuple accessToken ) : bool
accessToken DateTime>.Tuple The access token to verify.
return bool
        protected static bool IsAccessTokenValid(Tuple<string, DateTime> accessToken)
        {
            return accessToken != null &&
                   !string.IsNullOrEmpty(accessToken.Item1) &&
                   accessToken.Item2 > DateTime.UtcNow;
        }