public abstract class AuthInfo extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AuthInfo.AuthenticationType |
| Modifier and Type | Field and Description |
|---|---|
protected AuthInfo.AuthenticationType |
authenticationType |
protected String |
host |
protected FormSubmitEvent.MethodType |
httpMethod |
protected String |
loginTarget |
protected String |
password |
protected int |
port |
protected String |
protocol |
protected String |
username |
| Modifier | Constructor and Description |
|---|---|
|
AuthInfo()
Constructs a new AuthInfo.
|
protected |
AuthInfo(AuthInfo.AuthenticationType authenticationType,
FormSubmitEvent.MethodType httpMethod,
String loginUrl,
String username,
String password)
This constructor should only be used by extending classes
|
| Modifier and Type | Method and Description |
|---|---|
AuthInfo.AuthenticationType |
getAuthenticationType() |
String |
getHost() |
FormSubmitEvent.MethodType |
getHttpMethod() |
String |
getLoginTarget() |
String |
getPassword() |
int |
getPort() |
String |
getProtocol() |
String |
getUsername() |
void |
setAuthenticationType(AuthInfo.AuthenticationType authenticationType) |
void |
setHost(String host) |
void |
setHttpMethod(FormSubmitEvent.MethodType httpMethod) |
void |
setLoginTarget(String loginTarget) |
void |
setPassword(String password) |
void |
setPort(int port) |
void |
setProtocol(String protocol) |
void |
setUsername(String username) |
protected AuthInfo.AuthenticationType authenticationType
protected FormSubmitEvent.MethodType httpMethod
protected String protocol
protected String host
protected String loginTarget
protected int port
protected String username
protected String password
public AuthInfo()
protected AuthInfo(AuthInfo.AuthenticationType authenticationType, FormSubmitEvent.MethodType httpMethod, String loginUrl, String username, String password) throws MalformedURLException
authenticationType - Pick the one which matches your authenticationhttpMethod - Choose POST / GETloginUrl - Full URL of the login pageusername - Username for Authenticationpassword - Password for AuthenticationMalformedURLException - Make sure your URL is validpublic AuthInfo.AuthenticationType getAuthenticationType()
public void setAuthenticationType(AuthInfo.AuthenticationType authenticationType)
authenticationType - Should be set only by extending classes (BASICAuthInfo,
FORMAuthInfo)public FormSubmitEvent.MethodType getHttpMethod()
public void setHttpMethod(FormSubmitEvent.MethodType httpMethod)
httpMethod - Should be set by extending classes (POST, GET)public String getProtocol()
public void setProtocol(String protocol)
protocol - Don't set this one unless you know what you are doing (protocol: http, https)public String getHost()
public void setHost(String host)
host - Don't set this one unless you know what you are doing (sets the domain name)public String getLoginTarget()
public void setLoginTarget(String loginTarget)
loginTarget - Don't set this one unless you know what you are doing (eg: /login.php)public int getPort()
public void setPort(int port)
port - Don't set this one unless you know what you are doing (eg: 80, 443)public String getUsername()
public void setUsername(String username)
username - username used for Authenticationpublic String getPassword()
public void setPassword(String password)
password - password used for AuthenticationCopyright © 2017. All rights reserved.