我想将Pentaho与Silverlight平台集成。对于身份验证,有用于用户控制台的登录页面。我不想使用上面的登录页面登录,我想在后面的代码中登录。

我尝试了基本身份验证,但在新版本中将无法使用。

 string[] parts = System.Text.RegularExpressions.Regex.Split(ae.Result, "/");
                    String data = "userid=" + App.UserName + "&password=" + App.Password;
                    WebClient webClient = new System.Net.WebClient();
                    Uri uri = new Uri("http://localhost:8080/pentaho/Home?" + data);
                    webClient.Headers["Content-Type"] = "application/x-www-form-urlencoded";
                    webClient.Encoding = Encoding.UTF8;
                    App.WindowManager.ConsoleWrite(uri.ToString());
                    webClient.UploadStringAsync(uri, "POST", "");


但它可以与Pentaho的早期版本一起使用。我知道Pentaho中几乎没有其他可用的方法。但是它应该能够在Silverlight应用程序中执行。
您是否知道在Silverlight应用程序中有其他解决方案?

提前非常感谢您!!!

最佳答案

在以前的版本中,我们可以在调用prpt,xaction或Analyzer时将userid = admin&password = password作为URL的一部分传递。

在5.0中,我们只能通过URL认证到主页。

请尝试以下操作启用它。

 i)停止您的Bi服务器。
 ii)打开applicationContext-spring-security.xml并查找filterChainProxy bean。
 iii)注释bean中的现有值部分,并添加下面提供的新值部分。

 <value>
        <![CDATA[CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
        PATTERN_TYPE_APACHE_ANT
        /api/repos/dashboards/print=securityContextHolderAwareRequestFilter,httpSessionPentahoSessionContextIntegrationFilter,httpSessionContextIntegrationFilter,preAuthenticatedSecurityFilter,httpSessionReuseDetectionFilter,logoutFilter,authenticationProcessingFilter,basicProcessingFilter,requestParameterProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor
        /webservices/**=securityContextHolderAwareRequestFilterForWS,httpSessionPentahoSessionContextIntegrationFilter,httpSessionContextIntegrationFilter,basicProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilterForWS,filterInvocationInterceptorForWS
        /api/**=securityContextHolderAwareRequestFilterForWS,httpSessionPentahoSessionContextIntegrationFilter,httpSessionContextIntegrationFilter,requestParameterProcessingFilter,basicProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilterForWS,filterInvocationInterceptorForWS
        /plugin/**=securityContextHolderAwareRequestFilterForWS,httpSessionPentahoSessionContextIntegrationFilter,httpSessionContextIntegrationFilter,requestParameterProcessingFilter,basicProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilterForWS,filterInvocationInterceptorForWS
        /**=securityContextHolderAwareRequestFilter,httpSessionPentahoSessionContextIntegrationFilter,httpSessionContextIntegrationFilter,httpSessionReuseDetectionFilter,logoutFilter,authenticationProcessingFilter,basicProcessingFilter,requestParameterProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor]]>
      </value>


iv)重新启动服务器,您应该能够使用URL中的用户凭据来调用报告或xaction。
v)使用此测试URL http://localhost:8080/pentaho/api/repos/:public:Steel%20Wheels:Buyer%20Report%20%28sparkline%20report%29.prpt/viewer?userid=admin&password=password

关于c# - 银光应用程序中的Pentaho身份验证方法。,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/29159579/

10-13 05:30