All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.kawanfw.commons.api.server.SshAuthCommonsConfigurator Maven / Gradle / Ivy

Go to download

Awake FILE is a secure Open Source framework that allows to program very easily file uploads/downloads and RPC through http. File transfers include powerful features like file chunking and automatic recovery mechanism. Security has been taken into account from the design: server side allows to specify strong security rules in order to protect the files and to secure the RPC calls.

The newest version!
/**
 * 
 */
package org.kawanfw.commons.api.server;

import java.io.IOException;

import org.kawanfw.commons.api.server.util.Ssh;

/**
 * A concrete {@code CommonsConfigurator} that extends {@code DefaultCommonsConfigurator} and allows zero-code client 
 * {@code (usernname, password)} authentication using SSH.
 * 
 * @author Nicolas de Pomereu
 * @since 3.0
 */
public class SshAuthCommonsConfigurator extends DefaultCommonsConfigurator
	implements CommonsConfigurator {

    /**
     * Allows using SSH to authenticate the remote {@code (usernname, password)}  couple
     * sent by the client side
     * 

* Returns the result of {@link Ssh#login(String, char[])} method. * * @param username * the username sent by the client login * @param password * the password to connect to the server * * @return true if the (login, password) couple is * correct/valid as a SSH user on this host. If false, the client * side will not be authorized to send any command. * @throws IOException * if wrapped {@code Ssh.login(String, char[])} throws an * I/O Exception. */ @Override public boolean login(String username, char[] password) throws IOException { return Ssh.login(username, password); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy