public class Credentials extends Object
Constructor and Description |
---|
Credentials(String username,
String password) |
Credentials(String username,
String password,
SecurityRequirement requirement) |
Credentials(String username,
String password,
String realm) |
Modifier and Type | Method and Description |
---|---|
X509Certificate |
getIdentityCert() |
String |
getPassword() |
String |
getRealm()
Gets the realm to be used.
|
SecurityRequirement |
getSecurityRequirement() |
KeyStore |
getTrustStore() |
String |
getUsername() |
KeyStore |
setClientCert(KeyStore trustStore)
Sets the trust store to be used when working with peer certificates.
|
X509Certificate |
setIdentityCert(X509Certificate identityCert)
Sets the certificate to be used with this identity.
|
String |
setPassword(String password)
Sets the password to be used.
|
String |
setRealm(String realm)
Sets the realm for this user.
|
SecurityRequirement |
setSecurityRequirement(SecurityRequirement req)
Sets the security requirement assiciated with these credentials.
|
String |
setUsername(String username)
Sets the username to the specified String.
|
public Credentials(String username, String password, SecurityRequirement requirement)
public String getUsername()
public String setUsername(String username)
Sets the username to the specified String.
username
- the username to be setpublic X509Certificate getIdentityCert()
public X509Certificate setIdentityCert(X509Certificate identityCert)
Sets the certificate to be used with this identity.
identityCert
- the certificate to be setpublic KeyStore getTrustStore()
public KeyStore setClientCert(KeyStore trustStore)
Sets the trust store to be used when working with peer certificates.
trustStore
- the truststore to be setpublic String getPassword()
public String setPassword(String password)
Sets the password to be used.
password
- the password to be setpublic String getRealm()
Gets the realm to be used.
public String setRealm(String realm)
Sets the realm for this user.
realm
- name of the realm to be set. Set to 'null' to unset.public SecurityRequirement setSecurityRequirement(SecurityRequirement req)
Sets the security requirement assiciated with these credentials.
req
- the requirements to be associatedpublic SecurityRequirement getSecurityRequirement()
Copyright © 2023. All rights reserved.