Package com.cyberark.conjur.api
Class Credentials
- java.lang.Object
-
- com.cyberark.conjur.api.Credentials
-
public class Credentials extends Object
Stores credentials for a Conjur identity.A Conjur identity consists of a username and a password. The password may either be a user's password or the api key of a user or host. These cases are treated identically by the Conjur authentication service.
Credentials supports hashCode and equals and can be used as keys, for example for caching.
-
-
Constructor Summary
Constructors Constructor Description Credentials(String username, String password)Credentials(String username, String password, String authnUrl)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static CredentialsfromSystemProperties()Creates a Credentials instance from the system propertiesStringgetAuthnUrl()StringgetPassword()StringgetUsername()inthashCode()StringtoString()
-
-
-
Method Detail
-
fromSystemProperties
public static Credentials fromSystemProperties()
Creates a Credentials instance from the system properties- Returns:
- the credentials stored in the system property.
-
getUsername
public String getUsername()
- Returns:
- the username/login for this Conjur identity
-
getPassword
public String getPassword()
- Returns:
- the api key or password for this Conjur identity
-
getAuthnUrl
public String getAuthnUrl()
- Returns:
- the service id of this Conjur identity
-
-