@Test @Ignore public void testGetIdentities() { final OpenSSHAgentAuthenticator authenticator = new OpenSSHAgentAuthenticator(); final Collection<Identity> identities = authenticator.getIdentities(); assertNotNull(authenticator.getProxy()); assertFalse(identities.isEmpty()); }
@Override public Collection<Identity> getIdentities() { if(!SSHAgentConnector.isConnectorAvailable()) { log.warn(String.format("SSH agent %s is not running", this)); return Collections.emptyList(); } if(null == proxy) { return Collections.emptyList(); } if(log.isDebugEnabled()) { log.debug(String.format("Retrieve identities from proxy %s", proxy)); } final List<Identity> identities = Arrays.asList(proxy.getIdentities()); if(log.isDebugEnabled()) { log.debug(String.format("Found %d identities", identities.size())); } return identities; }
OpenSSHAgentAuthenticator extends AgentAuthenticator { @Override public Collection<Identity> getIdentities() { if(!SSHAgentConnector.isConnectorAvailable()) { log.warn(String.format("SSH agent %s is not running", this)); return Collections.emptyList(); } if(null == proxy) { return Collections.emptyList(); } if(log.isDebugEnabled()) { log.debug(String.format("Retrieve identities from proxy %s", proxy)); } final List<Identity> identities = Arrays.asList(proxy.getIdentities()); if(log.isDebugEnabled()) { log.debug(String.format("Found %d identities", identities.size())); } return identities; } }
OpenSSHAgentAuthenticator extends AgentAuthenticator { @Override public Collection<Identity> getIdentities() { if(!SSHAgentConnector.isConnectorAvailable()) { log.warn(String.format("SSH agent %s is not running", this)); return Collections.emptyList(); } if(null == proxy) { return Collections.emptyList(); } if(log.isDebugEnabled()) { log.debug(String.format("Retrieve identities from proxy %s", proxy)); } final List<Identity> identities = Arrays.asList(proxy.getIdentities()); if(log.isDebugEnabled()) { log.debug(String.format("Found %d identities", identities.size())); } return identities; } OpenSSHAgentAuthenticator(); }
OpenSSHAgentAuthenticator extends AgentAuthenticator { @Override public Collection<Identity> getIdentities() { if(!SSHAgentConnector.isConnectorAvailable()) { log.warn(String.format("SSH agent %s is not running", this)); return Collections.emptyList(); } if(null == proxy) { return Collections.emptyList(); } if(log.isDebugEnabled()) { log.debug(String.format("Retrieve identities from proxy %s", proxy)); } final List<Identity> identities = Arrays.asList(proxy.getIdentities()); if(log.isDebugEnabled()) { log.debug(String.format("Found %d identities", identities.size())); } return identities; } OpenSSHAgentAuthenticator(); @Override AgentProxy getProxy(); @Override Collection<Identity> getIdentities(); @Override String toString(); }
OpenSSHAgentAuthenticator extends AgentAuthenticator { @Override public Collection<Identity> getIdentities() { if(!SSHAgentConnector.isConnectorAvailable()) { log.warn(String.format("SSH agent %s is not running", this)); return Collections.emptyList(); } if(null == proxy) { return Collections.emptyList(); } if(log.isDebugEnabled()) { log.debug(String.format("Retrieve identities from proxy %s", proxy)); } final List<Identity> identities = Arrays.asList(proxy.getIdentities()); if(log.isDebugEnabled()) { log.debug(String.format("Found %d identities", identities.size())); } return identities; } OpenSSHAgentAuthenticator(); @Override AgentProxy getProxy(); @Override Collection<Identity> getIdentities(); @Override String toString();  }