ASPC.Marvel.CrimeAPI.SharePointContext.IsAccessTokenValid C# (CSharp) Méthode

IsAccessTokenValid() protected static méthode

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.
Résultat bool
        protected static bool IsAccessTokenValid(Tuple<string, DateTime> accessToken)
        {
            return accessToken != null &&
                   !string.IsNullOrEmpty(accessToken.Item1) &&
                   accessToken.Item2 > DateTime.UtcNow;
        }