public ProxyLoaderCXF(ServletContext application) throws MalformedURLException, IOException { URL prop = application.getResource("/META-INF/config.properties"); p = Helper.loadForJSP(prop); propertiesFile = prop; authmode = AuthMode.valueOf(p.getProperty(FGSMS_AUTH_MODE)); String tmp = System.getProperty("jboss.server.config.url"); if (Utility.stringIsNullOrEmpty(tmp)) { //FIX for Jboss 7 try { tmp = System.getProperty("jboss.server.config.dir"); File f = new File(tmp); tmp = f.toURI().toURL().toString(); tmp += File.separator; } catch (Exception e) { log.log(Level.DEBUG, null, e); } } tmp = System.getenv("CATALINA_HOME"); if (!Utility.stringIsNullOrEmpty(tmp)) { //we are in tomcat tmp = tmp + File.separator + "conf"; //assume that the keystore/truststore is in tomcat/conf folder } storelocation = tmp; if (storelocation==null) storelocation=""; } private String storelocation = "";
authmode = AuthMode.valueOf(p.getProperty(FGSMS_AUTH_MODE)); if (authmode == AuthMode.UsernamePassword) { if (Utility.stringIsNullOrEmpty((String) request.getSession().getAttribute("loginusername")) || Utility.stringIsNullOrEmpty((String) request.getSession().getAttribute("loginpassword"))) {
authmode = AuthMode.valueOf(p.getProperty(FGSMS_AUTH_MODE)); if (authmode == AuthMode.UsernamePassword) { if (Utility.stringIsNullOrEmpty((String) request.getSession().getAttribute("loginusername")) || Utility.stringIsNullOrEmpty((String) request.getSession().getAttribute("loginpassword"))) {
mode_ = org.miloss.fgsms.common.Constants.AuthMode.valueOf(prop.getProperty("fgsms.AuthMode").trim()); } catch (Exception ex) { mode_ = AuthMode.UsernamePassword;
config.inquiryendpoint = p.getProperty(UDDIURL_INQUIRY); config.publishendpoint = p.getProperty(UDDIURL_PUBLISH); authmode = AuthMode.valueOf(p.getProperty(FGSMS_AUTH_MODE)); if (authmode == AuthMode.UsernamePassword) { if (Utility.stringIsNullOrEmpty((String) request.getSession().getAttribute("loginusername")) || Utility.stringIsNullOrEmpty((String) request.getSession().getAttribute("loginpassword"))) {
authmode = AuthMode.valueOf(p.getProperty(FGSMS_AUTH_MODE)); if (authmode == AuthMode.UsernamePassword) { if (Utility.stringIsNullOrEmpty((String) request.getSession().getAttribute("loginusername")) || Utility.stringIsNullOrEmpty((String) request.getSession().getAttribute("loginpassword"))) {
authmode = AuthMode.valueOf(p.getProperty(FGSMS_AUTH_MODE)); if (authmode == AuthMode.UsernamePassword) { if (Utility.stringIsNullOrEmpty((String) request.getSession().getAttribute("loginusername")) || Utility.stringIsNullOrEmpty((String) request.getSession().getAttribute("loginpassword"))) {
authmode = AuthMode.valueOf(p.getProperty(FGSMS_AUTH_MODE)); if (authmode == AuthMode.UsernamePassword) { if (Utility.stringIsNullOrEmpty((String) request.getSession().getAttribute("loginusername")) || Utility.stringIsNullOrEmpty((String) request.getSession().getAttribute("loginpassword"))) {
authmode = AuthMode.valueOf(p.getProperty(FGSMS_AUTH_MODE)); if (authmode == AuthMode.UsernamePassword) { if (Utility.stringIsNullOrEmpty((String) request.getSession().getAttribute("loginusername")) || Utility.stringIsNullOrEmpty((String) request.getSession().getAttribute("loginpassword"))) {
URL pcsurl2 = new URL(p.getProperty(POLICYCONFIG)); authmode = AuthMode.valueOf(p.getProperty(FGSMS_AUTH_MODE));