Pentaho Authentication Method in Silver light Application.

后端 未结 2 899
故里飘歌
故里飘歌 2021-01-21 10:51

I want to integrate Pentaho with Silverlight platform.For the Authentication, there is log in page for user console. I do not want use above login page to login, I want to login

2条回答
  •  一向
    一向 (楼主)
    2021-01-21 11:28

    Authenticate with query string method is unsecured one, so I found a solution with Basic Authentication method.

    WebClient webClient = new System.Net.WebClient();
    Uri uri = new Uri("http://serverDomain:8080/pentaho/Home");
    //Give user name and password here
    var plainTextBytes = System.Text.Encoding.UTF8.GetBytes("username:password");
    var encodedString = System.Convert.ToBase64String(plainTextBytes);
    webClient.Headers["Authorization"] = "Basic " + encodedString;
    webClient.Encoding = Encoding.UTF8;
    App.WindowManager.ConsoleWrite(uri.ToString());
    webClient.UploadStringAsync(uri, "POST", "");
    

提交回复
热议问题