Package org.jclouds.domain
Class LoginCredentials
- java.lang.Object
-
- org.jclouds.domain.Credentials
-
- org.jclouds.domain.LoginCredentials
-
public class LoginCredentials extends Credentials
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LoginCredentials.Builder
-
Field Summary
-
Fields inherited from class org.jclouds.domain.Credentials
credential, identity
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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()
Deprecated.since 1.8; instead usegetOptionalPassword()
String
getPrivateKey()
Deprecated.since 1.8; instead usegetOptionalPrivateKey()
String
getUser()
boolean
hasUnencryptedPrivateKey()
boolean
shouldAuthenticateSudo()
secures access to root requires a password.LoginCredentials.Builder
toBuilder()
String
toString()
-
Methods inherited from class org.jclouds.domain.Credentials
equals, hashCode
-
-
-
-
Method Detail
-
fromCredentials
public static LoginCredentials fromCredentials(Credentials creds)
-
builder
public static LoginCredentials.Builder builder(Credentials creds)
-
builder
public static LoginCredentials.Builder builder()
-
getUser
public String getUser()
- Returns:
- the login user
-
getPassword
@Nullable @Deprecated public String getPassword()
Deprecated.since 1.8; instead usegetOptionalPassword()
- Returns:
- the password of the login user or null
-
getOptionalPassword
public com.google.common.base.Optional<String> getOptionalPassword()
- Returns:
- the optional password of the user (Optional.absent if none supplied).
-
getPrivateKey
@Nullable @Deprecated public String getPrivateKey()
Deprecated.since 1.8; instead usegetOptionalPrivateKey()
- Returns:
- the private ssh key of the user or null
-
hasUnencryptedPrivateKey
public boolean hasUnencryptedPrivateKey()
- Returns:
- true if there is a private key attached that is not encrypted
-
getOptionalPrivateKey
public com.google.common.base.Optional<String> getOptionalPrivateKey()
- Returns:
- the optional private ssh key of the user (Optional.absent if none supplied).
-
shouldAuthenticateSudo
public boolean shouldAuthenticateSudo()
secures access to root requires a password. This password is required to access either the console or run sudo as root. ex.echo 'password' |sudo -S command
- Returns:
- if a password is required to access the root user
-
toBuilder
public LoginCredentials.Builder toBuilder()
- Overrides:
toBuilder
in classCredentials
-
toString
public String toString()
- Overrides:
toString
in classCredentials
-
-