{
final GlobalAuthenticationStore authStore = designerContext.getGlobalAuthenticationStore();
final String rurl = authStore.getMostRecentEntry();
if (rurl != null)
{
final AuthenticationData loginData = getStoredLoginData(rurl, designerContext);
if (loginData != null)
{
return loginData;
}
}
final String user = ReportDesignerBoot.getInstance().getGlobalConfig().getConfigProperty
("org.pentaho.reporting.designer.extensions.pentaho.repository.ServerUser");
final String pass = ReportDesignerBoot.getInstance().getGlobalConfig().getConfigProperty
("org.pentaho.reporting.designer.extensions.pentaho.repository.ServerPassword");
final String url = ReportDesignerBoot.getInstance().getGlobalConfig().getConfigProperty
("org.pentaho.reporting.designer.extensions.pentaho.repository.PublishLocation");
if (StringUtils.isEmpty(url))
{
return null;
}
return new AuthenticationData(url, user, pass, WorkspaceSettings.getInstance().getConnectionTimeout());
}