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

org.littleshoot.proxy.ProxyAuthenticator Maven / Gradle / Ivy

Go to download

LittleProxy is a high performance HTTP proxy written in Java and using the Netty networking framework.

The newest version!
package org.littleshoot.proxy;

/**
 * Interface for objects that can authenticate someone for using our Proxy on
 * the basis of a username and password.
 */
public interface ProxyAuthenticator {
    /**
     * Authenticates the user using the specified userName and password.
     * 
     * @param userName The username.
     * @param password The password.
     * @return true if the credentials are acceptable, otherwise false.
     */
    boolean authenticate(String userName, String password);
    
    /**
     * The realm value to be used in the request for proxy authentication 
     * ("Proxy-Authenticate" header). Returning null will cause the string
     * "Restricted Files" to be used by default.
     */
    String getRealm();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy