private void SaveTokenToLocalStorage(TokenResponse token) { var storageItem = new InternalTokenStorageItem() { Token = token.AccessToken, AbsoluteExpirationDate = DateTime.Now.AddMilliseconds(token.ExpiresIn * 1000), }; _storage.SaveTo(StorageFileName, storageItem); }
private bool DeleteTokenIfExpired(InternalTokenStorageItem token) { if (DateTime.Now > token.AbsoluteExpirationDate) { DeleteToken(); return true; } return false; }
private bool DeleteTokenIfExpired(InternalTokenStorageItem token) { if (DateTime.Now > token.AbsoluteExpirationDate) { DeleteToken(); return(true); } return(false); }