public class LoginCredentials extends Credentials
Modifier and Type | Class and Description |
---|---|
static class |
LoginCredentials.Builder |
credential, identity, NO_CREDENTIALS
Constructor and Description |
---|
LoginCredentials(String username,
boolean authenticateSudo) |
LoginCredentials(String username,
com.google.common.base.Optional<String> password,
com.google.common.base.Optional<String> privateKey,
boolean authenticateSudo) |
LoginCredentials(String username,
String password,
String privateKey,
boolean authenticateSudo) |
Modifier and Type | Method and Description |
---|---|
static LoginCredentials.Builder |
builder() |
static LoginCredentials.Builder |
builder(Credentials creds) |
static LoginCredentials |
fromCredentials(Credentials creds) |
com.google.common.base.Optional<String> |
getOptionalPassword() |
com.google.common.base.Optional<String> |
getOptionalPrivateKey() |
String |
getPassword() |
String |
getPrivateKey() |
String |
getUser() |
boolean |
hasPassword() |
boolean |
hasPasswordOption() |
boolean |
hasPrivateKey() |
boolean |
hasPrivateKeyOption() |
boolean |
shouldAuthenticateSudo()
secures access to root requires a password.
|
LoginCredentials.Builder |
toBuilder() |
String |
toString() |
equals, hashCode, parse
public LoginCredentials(String username, boolean authenticateSudo)
public LoginCredentials(String username, @Nullable String password, @Nullable String privateKey, boolean authenticateSudo)
public static LoginCredentials fromCredentials(Credentials creds)
public static LoginCredentials.Builder builder(Credentials creds)
public static LoginCredentials.Builder builder()
public String getUser()
public boolean hasPassword()
public boolean hasPasswordOption()
@Nullable public com.google.common.base.Optional<String> getOptionalPassword()
public boolean hasPrivateKey()
public boolean hasPrivateKeyOption()
@Nullable public String getPrivateKey()
@Nullable public com.google.common.base.Optional<String> getOptionalPrivateKey()
public boolean shouldAuthenticateSudo()
echo 'password' |sudo -S command
public LoginCredentials.Builder toBuilder()
toBuilder
in class Credentials
public String toString()
toString
in class Credentials
Copyright © 2009-2012 jclouds. All Rights Reserved.