Package com.google.cloud.tools.jib.api
Class Credential
- java.lang.Object
-
- com.google.cloud.tools.jib.api.Credential
-
public class Credential extends java.lang.Object
Holds credentials (username and password).
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
OAUTH2_TOKEN_USER_NAME
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
static Credential
from(java.lang.String username, java.lang.String password)
Gets aCredential
configured with a username and password.java.lang.String
getPassword()
Gets the password.java.lang.String
getUsername()
Gets the username.int
hashCode()
boolean
isOAuth2RefreshToken()
Check whether this credential is an OAuth 2.0 refresh token.java.lang.String
toString()
-
-
-
Field Detail
-
OAUTH2_TOKEN_USER_NAME
public static final java.lang.String OAUTH2_TOKEN_USER_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
from
public static Credential from(java.lang.String username, java.lang.String password)
Gets aCredential
configured with a username and password.- Parameters:
username
- the usernamepassword
- the password- Returns:
- a new
Credential
-
getUsername
public java.lang.String getUsername()
Gets the username.- Returns:
- the username
-
getPassword
public java.lang.String getPassword()
Gets the password.- Returns:
- the password
-
isOAuth2RefreshToken
public boolean isOAuth2RefreshToken()
Check whether this credential is an OAuth 2.0 refresh token.- Returns:
- true if this credential is an OAuth 2.0 refresh token.
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-