Package io.pivotal.cfenv.core
Class CfCredentials
java.lang.Object
io.pivotal.cfenv.core.CfCredentials
Access service credentials.
- Author:
- Mark Pollack
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet a map that contains credentials derived from the credentials mapgetHost()Return the host, under the keys 'host' and 'hostname' in the credential map.getMap()getName()Return the password, under the key 'password' in the credential map.getPort()Return the port, under the key 'port' in the credential map.Return the URI field, by default look under the field name 'uri' and 'url', but also optionally look in field names that begin with the uriScheme and are suffixed with 'Uri', 'uri', 'Url' and 'url'Return UriInfo derived from the field 'uri' or 'url'getUriInfo(String uriScheme) Return UriInfo derived from URI fieldReturn the username, under the keys 'username' and 'user' in the credential map.
-
Constructor Details
-
CfCredentials
-
-
Method Details
-
getMap
-
getDerivedCredentials
Get a map that contains credentials derived from the credentials map- Returns:
- derived credentials
-
getHost
Return the host, under the keys 'host' and 'hostname' in the credential map. If it is not found try to obtain the host from the uri field.- Returns:
- value of the host, null if not found.
-
getPort
Return the port, under the key 'port' in the credential map. If it is not found try to obtain the port from the uri field.- Returns:
- value of the port, null if not found.
-
getName
-
getUsername
Return the username, under the keys 'username' and 'user' in the credential map. If it is not found try to obtain the username from the uri field.- Returns:
- value of the username, null if not found.
-
getPassword
Return the password, under the key 'password' in the credential map. If it is not found try to obtain the password in the uri field.- Returns:
- value of the password, null if not found.
-
getUri
Return the URI field, by default look under the field name 'uri' and 'url', but also optionally look in field names that begin with the uriScheme and are suffixed with 'Uri', 'uri', 'Url' and 'url'- Parameters:
uriSchemes- optional list of uri scheme names to use as a prefix for an expanded search of the uri field- Returns:
- the value of the uri field
-
getUriInfo
Return UriInfo derived from the field 'uri' or 'url'- Returns:
- the UriInfo object
-
getUriInfo
Return UriInfo derived from URI field- Parameters:
uriScheme- a uri scheme name to use as a prefix to search of the uri field- Returns:
- the UriInfo object
-
getString
-