protected void disconnect_Click(object sender, EventArgs e)
 {
     try
     {
         RestHelper.disconnectRealm(RestProfile.GetRestProfile());
     }
     catch
     {
     }
     finally { loadVisibleSections(); }
 }
 public void ToggleBlueDotMenuVisibility()
 {
     if (System.Web.HttpContext.Current.User.Identity.IsAuthenticated && RestHelper.appTokensSet() && !Request.FilePath.Contains("OAuth"))
     {
         RestProfile profile = RestProfile.GetRestProfile();
         blueDotMenu.Visible = profile.OAuthAccessToken.Length > 0;
     }
     else
     {
         blueDotMenu.Visible = false;
     }
 }
Пример #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!System.Web.HttpContext.Current.User.Identity.IsAuthenticated || !RestHelper.appTokensSet() || RestProfile.GetRestProfile().OAuthAccessToken.Length == 0)
         {
             Response.Redirect("~/ManageConnection");
         }
         customersView.DataSource = RestHelper.getCustomerList(RestProfile.GetRestProfile());
         customersView.DataBind();
     }
     catch
     {
     }
 }
 private void loadVisibleSections()
 {
     notLoggedIn.Visible       = false;
     notConnected.Visible      = false;
     connected.Visible         = false;
     appTokensNotFound.Visible = false;
     if (!RestHelper.appTokensSet())
     {
         appTokensNotFound.Visible = true;
     }
     else if (!System.Web.HttpContext.Current.User.Identity.IsAuthenticated)
     {
         notLoggedIn.Visible = true;
     }
     else
     {
         notConnected.Visible = RestProfile.GetRestProfile().OAuthAccessToken == "";
         connected.Visible    = RestProfile.GetRestProfile().OAuthAccessToken != "";
     }
     (this.Master as SiteMaster).ToggleBlueDotMenuVisibility();
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            RestProfile profile = RestProfile.GetRestProfile();

            Response.Write(RestHelper.callPlatform(profile, Constants.IppEndPoints.BlueDotAppMenuUrl));
        }