public void Distribute(string token) { _platformTokenProvider.Set(token); _loggingContext.Set("token", token); _loggingContext.Set("hash", _platformHashProvider.GetHash()); _loggingContext.Set("userId", _usersApi.Current().Id.ToString(CultureInfo.InvariantCulture)); }
public ActionResult Index() { // Making sure the application is configured correctly and the application is called from a canvas // Delete this code once this is done try { var appId = _applicationSettings.AppId; var appSecret = _applicationSettings.AppSecret; } catch (ConfigurationErrorsException) { return(Redirect("/landing")); } if (_platformTokenProvider.Get() == null) { return(Redirect("/landing")); } var currentUser = _usersApi.Current(); var currentUserFollowing = _usersApi.GetFollowing(currentUser.Id); return(View(ToModel(currentUser, currentUserFollowing))); }