Exemplo n.º 1
0
        /// <summary>
        /// Checks if the access token is still valid.  If not, refreshes the token.
        /// </summary>
        protected bool RefreshTokenIfNeeded()
        {
            bool           needsRefresh = false;
            LiveAuthClient authClient   = this.LiveClient.Session.AuthClient;

            if (!this.refreshed && authClient != null)
            {
                this.refreshed = true;

                needsRefresh = authClient.RefreshToken(this.OnRefreshTokenOperationCompleted);
            }

            return(needsRefresh);
        }