Examples of PasswordManager


Examples of it.baeyens.arduino.tools.PasswordManager

  String host = ArduinoHelpers.getHostFromComPort(MComPort);

  if (host != null) {
      myHighLevelConsoleStream.println("using ssh loader");
      PasswordManager pwdManager = new PasswordManager();
      if (!pwdManager.setHost(host)) {
    Common.log(new Status(IStatus.ERROR, ArduinoConst.CORE_PLUGIN_ID, "No credentials to logon to " + host));
      }

      String password = pwdManager.getPassword();
      String login = pwdManager.getLogin();

      realUploader = new SSHUpload(myHighLevelConsoleStream, myOutconsoleStream, myErrconsoleStream, password, host, login);
      uploadJobName = ArduinoConst.Upload_ssh;
  } else if (UpLoadTool.equalsIgnoreCase(ArduinoConst.UploadToolTeensy)) {
      myHighLevelConsoleStream.println("using generic local uploader");
View Full Code Here

Examples of org.apache.synapse.securevault.PasswordManager

                env.put("jmx.remote.x.password.file", jmxInformation.getRemotePasswordFile());
            } else {
                SecretInformation secretInformation = jmxInformation.getSecretInformation();
                // Get the global secret resolver
                //TODO This should be properly implemented if JMX adapter is going to use out side synapse
                PasswordManager pwManager = PasswordManager.getInstance();
                if (pwManager.isInitialized()) {
                    secretInformation.setGlobalSecretResolver(pwManager.getSecretResolver());
                }
                env.put(JMXConnectorServer.AUTHENTICATOR,
                        new JmxSecretAuthenticator(jmxInformation.getSecretInformation()));
            }
View Full Code Here

Examples of org.apache.synapse.securevault.PasswordManager

                serverContextInformation, serverConfigurationInformation);

        if (serverState == ServerState.INITIALIZED || serverState == ServerState.STOPPED) {

            // Shutdown global PasswordManager instance used in synapse
            PasswordManager passwordManager = PasswordManager.getInstance();
            if (passwordManager.isInitialized()) {
                PasswordManager.getInstance().shutDown();
            }

            // un-register the ServerManager MBean
            unRegisterMBean();
View Full Code Here

Examples of org.apache.synapse.securevault.PasswordManager

                                propValue != null && !"".equals(propValue.trim())) {

                            propName = propName.trim();
                            propValue = propValue.trim();

                            PasswordManager passwordManager =
                                    PasswordManager.getInstance();
                            String key = eventSource.getName() + "." + propName;

                            if (passwordManager.isInitialized()
                                    && passwordManager.isTokenProtected(key)) {
                                eventSource.putConfigurationProperty(propName, propValue);
                                propValue = passwordManager.resolve(propValue);
                            }

                            manager.addProperty(propName, propValue);
                        }
                    }
View Full Code Here

Examples of org.apache.synapse.securevault.PasswordManager

                env.put("jmx.remote.x.password.file", jmxInformation.getRemotePasswordFile());
            } else {
                SecretInformation secretInformation = jmxInformation.getSecretInformation();
                // Get the global secret resolver
                //TODO This should be properly implemented if JMX adapter is going to use out side synapse
                PasswordManager pwManager = PasswordManager.getInstance();
                if (pwManager.isInitialized()) {
                    secretInformation.setGlobalSecretResolver(pwManager.getSecretResolver());
                }
                env.put(JMXConnectorServer.AUTHENTICATOR,
                        new JmxSecretAuthenticator(jmxInformation.getSecretInformation()));
            }
View Full Code Here

Examples of org.wso2.securevault.PasswordManager

                                propValue != null && !"".equals(propValue.trim())) {

                            propName = propName.trim();
                            propValue = propValue.trim();

                            PasswordManager passwordManager =
                                    PasswordManager.getInstance();
                            String key = eventSource.getName() + "." + propName;

                            if (passwordManager.isInitialized()
                                    && passwordManager.isTokenProtected(key)) {
                                eventSource.putConfigurationProperty(propName, propValue);
                                propValue = passwordManager.resolve(propValue);
                            }

                            manager.addProperty(propName, propValue);
                        }
                    }
View Full Code Here

Examples of org.wso2.securevault.PasswordManager

                env.put("jmx.remote.x.password.file", jmxInformation.getRemotePasswordFile());
            } else {
                SecretInformation secretInformation = jmxInformation.getSecretInformation();
                // Get the global secret resolver
                //TODO This should be properly implemented if JMX adapter is going to use out side synapse
                PasswordManager pwManager = PasswordManager.getInstance();
                if (pwManager.isInitialized()) {
                    secretInformation.setGlobalSecretResolver(pwManager.getSecretResolver());
                }
                env.put(JMXConnectorServer.AUTHENTICATOR,
                        new JmxSecretAuthenticator(jmxInformation.getSecretInformation()));
            }
View Full Code Here

Examples of org.wso2.securevault.PasswordManager

                serverContextInformation, serverConfigurationInformation);

        if (serverState == ServerState.INITIALIZED || serverState == ServerState.STOPPED) {

            // Shutdown global PasswordManager instance used in synapse
            PasswordManager passwordManager = PasswordManager.getInstance();
            if (passwordManager.isInitialized()) {
                PasswordManager.getInstance().shutDown();
            }

            // un-register the ServerManager MBean
            unRegisterMBean();
View Full Code Here

Examples of se.gu.fire.data.PasswordManager

        testBean.clearDb();
    }

    @Test
    public void insertAndGetPassword() {
        PasswordManager pm = new PasswordManager();
        pm.setEntityManager(em);
       
        UserManager um = new UserManager();
        um.setEntityManager(em);
       
        em.getTransaction().begin();
        Password password = new Password(10L, "tio");
        pm.create(password);
        em.getTransaction().commit();

        assertNotNull(pm.read(10L));

    }
View Full Code Here

Examples of se.gu.fire.data.PasswordManager

    }
   
    @Test
    public void associatePasswordWithUser() {
        PasswordManager pm = new PasswordManager();
        pm.setEntityManager(em);
       
        UserManager um = new UserManager();
        um.setEntityManager(em);
       
        FireUser oscar = TestUtil.createRandomUser();

        em.getTransaction().begin();
        um.create(oscar);
        em.getTransaction().commit();
       
        FireUser u5 = um.read(oscar.getId());
        assertNotNull(u5);

        String smart = "haxx";
        Password oscarsPassword = new Password(oscar.getId(), smart);
        em.getTransaction().begin();
        pm.create(oscarsPassword);
        em.getTransaction().commit();
       
        assertNotNull(pm.findPassword(oscar, smart));
        assertNull(pm.findPassword(oscar, "ohack"));

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.