-
Notifications
You must be signed in to change notification settings - Fork 735
Expand file tree
/
Copy pathProxyAuthenticator.java
More file actions
30 lines (27 loc) · 913 Bytes
/
ProxyAuthenticator.java
File metadata and controls
30 lines (27 loc) · 913 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package org.littleshoot.proxy;
import io.netty.handler.codec.http.HttpRequest;
/**
* 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 user name.
* @param password
* The password.
* @return <code>true</code> if the credentials are acceptable, otherwise
* <code>false</code>.
*/
boolean authenticate(String userName, String password, HttpRequest httpRequest);
/**
* 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.
*
* @return
*/
String getRealm();
}