public abstract class HTTPAuthentication extends Object implements Authentication
Constructor and Description |
---|
HTTPAuthentication() |
Modifier and Type | Method and Description |
---|---|
void |
authenticate()
Runs the authentication.
|
protected SSLContext |
createSSLContext()
Creates a ssl context with custom CAs if set.
|
String |
getCAFile()
Returns path to custom CA file.
|
String |
getCAPath()
Returns path to the custom CA directory.
|
HTTPConnection |
getConnection() |
org.apache.http.client.CredentialsProvider |
getCredentialsProvider() |
abstract Authentication |
getFallback()
Returns authentication's fallback authentication method.
|
abstract String |
getIdentifier()
Returns unique identifier for this authentication method.
|
org.apache.http.HttpHost |
getTarget()
Returns server that authentication is run against.
|
protected KeyStore |
loadCAs()
Loads custom CAs either from file or directory.
|
void |
setCAFile(String CAFile)
Sets path to custom CA file
|
void |
setCAPath(String CAPath)
Sets path to custom CA directory.
|
void |
setConnection(HTTPConnection connection) |
void |
setCredentialsProvider(org.apache.http.client.CredentialsProvider credentialsProvider) |
void |
setTarget(org.apache.http.HttpHost target)
Sets server to run authentication against.
|
public org.apache.http.HttpHost getTarget()
public void setTarget(org.apache.http.HttpHost target)
target
- serverpublic HTTPConnection getConnection()
public void setConnection(HTTPConnection connection)
public org.apache.http.client.CredentialsProvider getCredentialsProvider()
public void setCredentialsProvider(org.apache.http.client.CredentialsProvider credentialsProvider)
public String getCAPath()
public void setCAPath(String CAPath)
CAPath
- path to custom CA directorypublic String getCAFile()
public void setCAFile(String CAFile)
CAFile
- path to custom CA filepublic abstract String getIdentifier()
Authentication
getIdentifier
in interface Authentication
public abstract Authentication getFallback()
Authentication
getFallback
in interface Authentication
protected SSLContext createSSLContext() throws AuthenticationException
AuthenticationException
public void authenticate() throws CommunicationException
Authentication
authenticate
in interface Authentication
CommunicationException
- when error occures during the
communicationprotected KeyStore loadCAs() throws AuthenticationException
AuthenticationException
Copyright © 2016. All Rights Reserved.