@PublicAPI public class CredData extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static String |
SSH_PRIVATE_KEY
thirdPartyCredentials can contain the SSH key used for runAsMe tasks under this specific key
|
Constructor and Description |
---|
CredData() |
CredData(String login,
String pass) |
CredData(String login,
String pass,
byte[] key) |
CredData(String login,
String password,
Map<String,String> thirdPartyCredentials) |
CredData(String login,
String domain,
String pass) |
CredData(String login,
String domain,
String pass,
byte[] key) |
Modifier and Type | Method and Description |
---|---|
void |
addThirdPartyCredential(String key,
String decryptedValue) |
String |
getDomain()
Return the domain of this user or null if no domain has been specified.
|
byte[] |
getKey()
Get the key
|
String |
getLogin()
Get the login
|
String[] |
getLoginPassword()
Return the login and password as a string array.
|
String |
getPassword()
Get the password
|
Map<String,String> |
getThirdPartyCredentials() |
static String |
parseDomain(String fullLogin)
Extract the Windows domain name from the full login
parseDomain("domain\\user") returns domain
parseDomain("user") returns null
|
static String |
parseLogin(String fullLogin)
Extract the user name from the full login
parseDomain("domain\\user") returns user
parseDomain("user") returns user
|
void |
setDomain(String domain)
Set a domain for this user.
|
void |
setKey(byte[] key)
Set the key value to the given key value
|
void |
setLogin(String login)
Set the login value to the given login value
|
void |
setPassword(String pass)
Set the password value to the given pass value
|
public static final String SSH_PRIVATE_KEY
public static String parseDomain(String fullLogin)
fullLogin
- the login to parsepublic static String parseLogin(String fullLogin)
fullLogin
- the login to parsepublic String getLogin()
public void setLogin(String login)
login
- the login to setpublic String getPassword()
public void setPassword(String pass)
pass
- the password to setpublic byte[] getKey()
public void setKey(byte[] key)
key
- the key to setpublic String getDomain()
public void setDomain(String domain)
domain
- the domain to setpublic String[] getLoginPassword()