public interface Credentials
Modifier and Type | Method and Description |
---|---|
void |
close(Credential credential)
Close a Credential
|
Credential |
getDefaultCredential(String scheme)
Creates a default credential for the given scheme.
|
boolean |
isOpen(Credential credential)
Test if a Credential is open.
|
Credential |
newCertificateCredential(String scheme,
String certfile,
String username,
char[] password,
Map<String,String> properties)
Constructs a certificate Credential.
|
Credential |
newPasswordCredential(String scheme,
String username,
char[] password,
Map<String,String> properties)
Constructs a password credential.
|
Credential newCertificateCredential(String scheme, String certfile, String username, char[] password, Map<String,String> properties) throws XenonException
scheme
- the scheme for which to create a credential.certfile
- the certificate file (for example userkey.pem or id_dsa).username
- the user name.password
- the password or pass phrase belonging to the certificate.properties
- (optional) properties used to configure the credential.UnknownPropertyException
- If an unknown property was passed.InvalidPropertyException
- If a known property was passed with an illegal value.CertificateNotFoundException
- If the certificate file could not be found.XenonException
- If the Credential could not be created.
Credential newPasswordCredential(String scheme, String username, char[] password, Map<String,String> properties) throws XenonException
scheme
- the scheme for which to create a credential.username
- the user name.password
- the password.properties
- (optional) properties used to configure the credential.UnknownPropertyException
- If an unknown property was passed.InvalidPropertyException
- If a known property was passed with an illegal value.XenonException
- If the Credential could not be created.
Credential getDefaultCredential(String scheme) throws XenonException
scheme
- the scheme for which to create a certificate.UnknownPropertyException
- If an unknown property was passed.InvalidPropertyException
- If a known property was passed with an illegal value.XenonException
- If the Credential could not be created.
void close(Credential credential) throws XenonException
credential
- the Credential to close.XenonException
- If the Credential failed to close.boolean isOpen(Credential credential) throws XenonException
credential
- the Credential to test.XenonException
- If the test failed.