public final class Authentication extends Object
Constructor and Description |
---|
Authentication(String username,
char[] password)
Creates a basic username+password authentication.
|
Authentication(String username,
char[] password,
String privateKeyFile,
char[] passphrase)
Creates a new authentication with the specified properties
|
Authentication(String username,
String password)
Creates a basic username+password authentication.
|
Authentication(String username,
String password,
String privateKeyFile,
String passphrase)
Creates a new authentication with the specified properties
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getPassphrase()
Gets the passphrase for the private key.
|
String |
getPassword()
Gets the password.
|
String |
getPrivateKeyFile()
Gets the path to the private key file to use for authentication.
|
String |
getUsername()
Gets the username.
|
int |
hashCode() |
Authentication |
setPassphrase(char[] passphrase)
Sets the passphrase for the private key file.
|
Authentication |
setPassphrase(String passphrase)
Sets the passphrase for the private key file.
|
Authentication |
setPassword(char[] password)
Sets the password to use for authentication.
|
Authentication |
setPassword(String password)
Sets the password to use for authentication.
|
Authentication |
setPrivateKeyFile(String privateKeyFile)
Sets the path to the private key file to use for authentication.
|
Authentication |
setUsername(String username)
Sets the username to use for authentication.
|
String |
toString() |
public Authentication(String username, char[] password, String privateKeyFile, char[] passphrase)
username
- The username, may be null
.password
- The password, may be null
.privateKeyFile
- The path to the private key file, may be null
.passphrase
- The passphrase for the private key file, may be null
.public Authentication(String username, String password, String privateKeyFile, String passphrase)
username
- The username, may be null
.password
- The password, may be null
.privateKeyFile
- The path to the private key file, may be null
.passphrase
- The passphrase for the private key file, may be null
.public Authentication(String username, String password)
username
- The username, may be null
.password
- The password, may be null
.public Authentication(String username, char[] password)
username
- The username, may be null
.password
- The password, may be null
.public String getUsername()
null
if none.public Authentication setUsername(String username)
username
- The username, may be null
.null
.public String getPassword()
null
if none.public Authentication setPassword(String password)
password
- The password, may be null
.null
.public Authentication setPassword(char[] password)
password
- The password, may be null
.null
.public String getPrivateKeyFile()
null
if none.public Authentication setPrivateKeyFile(String privateKeyFile)
privateKeyFile
- The path to the private key file, may be null
.null
.public String getPassphrase()
null
if none.public Authentication setPassphrase(String passphrase)
passphrase
- The passphrase for the private key file, may be null
.null
.public Authentication setPassphrase(char[] passphrase)
passphrase
- The passphrase for the private key file, may be null
.null
.Copyright © 2010-2012 Sonatype, Inc.. All Rights Reserved.