class 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);
        }
    }

    public  SFTPNoneAuthentication(final SFTPSession session);

}