public class X509Authentication extends CertificateAuthentication
Supports certificates in pk12 or pem format. This method has a Keystone authentication method as fallback.
Example:
HTTPAuthentication auth = new X509Authentication("/path/to/certificate.pem", "password");
auth.setCAPath("/etc/grid-security/certificates/"); //path to CA directory
Client client = new HTTPClient(URI.create("https://remote.server.net"), auth);| Modifier and Type | Field and Description |
|---|---|
static String |
IDENTIFIER |
| Constructor and Description |
|---|
X509Authentication(String certificate,
String password)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Authentication |
getFallback()
Returns authentication's fallback authentication method.
|
String |
getIdentifier()
Returns unique identifier for this authentication method.
|
void |
setPassword(String password)
Sets user's password.
|
authenticate, createSSLContext, getCertificate, getPassword, setCertificategetCAFile, getCAPath, getConnection, getCredentialsProvider, getTarget, loadCAs, setCAFile, setCAPath, setConnection, setCredentialsProvider, setTargetpublic static final String IDENTIFIER
public String getIdentifier()
AuthenticationgetIdentifier in interface AuthenticationgetIdentifier in class HTTPAuthenticationpublic Authentication getFallback()
AuthenticationgetFallback in interface AuthenticationgetFallback in class HTTPAuthenticationpublic void setPassword(String password)
setPassword in class CertificateAuthenticationpassword - user's password, cannot be null nor emptyCopyright © 2016. All rights reserved.