@Test @Ignore public void testLoginPamAuthentication() throws Exception { final ProtocolFactory factory = new ProtocolFactory(new HashSet<>(Collections.singleton(new IRODSProtocol()))); final Profile profile = new ProfilePlistReader(factory).read( new Local("../profiles/iRODS (TACC).cyberduckprofile")); final Host host = new Host(profile, profile.getDefaultHostname(), new Credentials( String.format("PAM:%s", System.getProperties().getProperty("tacc.key")), System.getProperties().getProperty("tacc.secret") )); final IRODSSession session = new IRODSSession(host); assertNotNull(session.open(Proxy.DIRECT, new DisabledHostKeyCallback(), new DisabledLoginCallback())); assertTrue(session.isConnected()); session.login(Proxy.DIRECT, new DisabledLoginCallback(), new DisabledCancelCallback()); }
@Override public void login(final Proxy proxy, final LoginCallback prompt, final CancelCallback cancel) throws BackgroundException { try { final IRODSAccount account = client.getIRODSAccount(); final Credentials credentials = host.getCredentials(); account.setUserName(credentials.getUsername()); account.setPassword(credentials.getPassword()); final AuthResponse response = client.getIRODSAccessObjectFactory().authenticateIRODSAccount(account); if(log.isDebugEnabled()) { log.debug(String.format("Connected to %s", response.getStartupResponse())); } if(!response.isSuccessful()) { throw new LoginFailureException(MessageFormat.format(LocaleFactory.localizedString( "Login {0} with username and password", "Credentials"), BookmarkNameProvider.toString(host))); } } catch(JargonException e) { throw new IRODSExceptionMappingService().map(e); } }
IRODSSession extends SSLSession<IRODSFileSystemAO> { @Override public void login(final Proxy proxy, final LoginCallback prompt, final CancelCallback cancel) throws BackgroundException { try { final IRODSAccount account = client.getIRODSAccount(); final Credentials credentials = host.getCredentials(); account.setUserName(credentials.getUsername()); account.setPassword(credentials.getPassword()); final AuthResponse response = client.getIRODSAccessObjectFactory().authenticateIRODSAccount(account); if(log.isDebugEnabled()) { log.debug(String.format("Connected to %s", response.getStartupResponse())); } if(!response.isSuccessful()) { throw new LoginFailureException(MessageFormat.format(LocaleFactory.localizedString( "Login {0} with username and password", "Credentials"), BookmarkNameProvider.toString(host))); } } catch(JargonException e) { throw new IRODSExceptionMappingService().map(e); } } }
IRODSSession extends SSLSession<IRODSFileSystemAO> { @Override public void login(final Proxy proxy, final LoginCallback prompt, final CancelCallback cancel) throws BackgroundException { try { final IRODSAccount account = client.getIRODSAccount(); final Credentials credentials = host.getCredentials(); account.setUserName(credentials.getUsername()); account.setPassword(credentials.getPassword()); final AuthResponse response = client.getIRODSAccessObjectFactory().authenticateIRODSAccount(account); if(log.isDebugEnabled()) { log.debug(String.format("Connected to %s", response.getStartupResponse())); } if(!response.isSuccessful()) { throw new LoginFailureException(MessageFormat.format(LocaleFactory.localizedString( "Login {0} with username and password", "Credentials"), BookmarkNameProvider.toString(host))); } } catch(JargonException e) { throw new IRODSExceptionMappingService().map(e); } } IRODSSession(final Host h);  IRODSSession(final Host h, final X509TrustManager trust, final X509KeyManager key); }
IRODSSession extends SSLSession<IRODSFileSystemAO> { @Override public void login(final Proxy proxy, final LoginCallback prompt, final CancelCallback cancel) throws BackgroundException { try { final IRODSAccount account = client.getIRODSAccount(); final Credentials credentials = host.getCredentials(); account.setUserName(credentials.getUsername()); account.setPassword(credentials.getPassword()); final AuthResponse response = client.getIRODSAccessObjectFactory().authenticateIRODSAccount(account); if(log.isDebugEnabled()) { log.debug(String.format("Connected to %s", response.getStartupResponse())); } if(!response.isSuccessful()) { throw new LoginFailureException(MessageFormat.format(LocaleFactory.localizedString( "Login {0} with username and password", "Credentials"), BookmarkNameProvider.toString(host))); } } catch(JargonException e) { throw new IRODSExceptionMappingService().map(e); } } IRODSSession(final Host h);  IRODSSession(final Host h, final X509TrustManager trust, final X509KeyManager key); @Override void login(final Proxy proxy, final LoginCallback prompt, final CancelCallback cancel); @Override @SuppressWarnings("unchecked") T _getFeature(final Class<T> type); }
IRODSSession extends SSLSession<IRODSFileSystemAO> { @Override public void login(final Proxy proxy, final LoginCallback prompt, final CancelCallback cancel) throws BackgroundException { try { final IRODSAccount account = client.getIRODSAccount(); final Credentials credentials = host.getCredentials(); account.setUserName(credentials.getUsername()); account.setPassword(credentials.getPassword()); final AuthResponse response = client.getIRODSAccessObjectFactory().authenticateIRODSAccount(account); if(log.isDebugEnabled()) { log.debug(String.format("Connected to %s", response.getStartupResponse())); } if(!response.isSuccessful()) { throw new LoginFailureException(MessageFormat.format(LocaleFactory.localizedString( "Login {0} with username and password", "Credentials"), BookmarkNameProvider.toString(host))); } } catch(JargonException e) { throw new IRODSExceptionMappingService().map(e); } } IRODSSession(final Host h);  IRODSSession(final Host h, final X509TrustManager trust, final X509KeyManager key); @Override void login(final Proxy proxy, final LoginCallback prompt, final CancelCallback cancel); @Override @SuppressWarnings("unchecked") T _getFeature(final Class<T> type);  }