@Test(expected = LoginFailureException.class) @Ignore public void testAuthenticate() throws Exception { assertFalse(new SFTPNoneAuthentication(session).authenticate(session.getHost(), new DisabledLoginCallback(), new DisabledCancelCallback())); }
@Override public Boolean authenticate(final Host bookmark, final LoginCallback prompt, final CancelCallback cancel) throws BackgroundException { if(log.isDebugEnabled()) { log.debug(String.format("Login using none authentication with credentials %s", bookmark.getCredentials())); } try { session.getClient().auth(bookmark.getCredentials().getUsername(), new AuthNone()); return session.getClient().isAuthenticated(); } catch(IOException e) { throw new SFTPExceptionMappingService().map(e); } }
SFTPNoneAuthentication implements AuthenticationProvider<Boolean> { @Override public Boolean authenticate(final Host bookmark, final LoginCallback prompt, final CancelCallback cancel) throws BackgroundException { if(log.isDebugEnabled()) { log.debug(String.format("Login using none authentication with credentials %s", bookmark.getCredentials())); } try { session.getClient().auth(bookmark.getCredentials().getUsername(), new AuthNone()); return session.getClient().isAuthenticated(); } catch(IOException e) { throw new SFTPExceptionMappingService().map(e); } } }
SFTPNoneAuthentication implements AuthenticationProvider<Boolean> { @Override public Boolean authenticate(final Host bookmark, final LoginCallback prompt, final CancelCallback cancel) throws BackgroundException { if(log.isDebugEnabled()) { log.debug(String.format("Login using none authentication with credentials %s", bookmark.getCredentials())); } try { session.getClient().auth(bookmark.getCredentials().getUsername(), new AuthNone()); return session.getClient().isAuthenticated(); } catch(IOException e) { throw new SFTPExceptionMappingService().map(e); } } SFTPNoneAuthentication(final SFTPSession session); }
SFTPNoneAuthentication implements AuthenticationProvider<Boolean> { @Override public Boolean authenticate(final Host bookmark, final LoginCallback prompt, final CancelCallback cancel) throws BackgroundException { if(log.isDebugEnabled()) { log.debug(String.format("Login using none authentication with credentials %s", bookmark.getCredentials())); } try { session.getClient().auth(bookmark.getCredentials().getUsername(), new AuthNone()); return session.getClient().isAuthenticated(); } catch(IOException e) { throw new SFTPExceptionMappingService().map(e); } } SFTPNoneAuthentication(final SFTPSession session); @Override Boolean authenticate(final Host bookmark, final LoginCallback prompt, final CancelCallback cancel); @Override String getMethod(); }
SFTPNoneAuthentication implements AuthenticationProvider<Boolean> { @Override public Boolean authenticate(final Host bookmark, final LoginCallback prompt, final CancelCallback cancel) throws BackgroundException { if(log.isDebugEnabled()) { log.debug(String.format("Login using none authentication with credentials %s", bookmark.getCredentials())); } try { session.getClient().auth(bookmark.getCredentials().getUsername(), new AuthNone()); return session.getClient().isAuthenticated(); } catch(IOException e) { throw new SFTPExceptionMappingService().map(e); } } SFTPNoneAuthentication(final SFTPSession session); @Override Boolean authenticate(final Host bookmark, final LoginCallback prompt, final CancelCallback cancel); @Override String getMethod();  }