public class Credentials extends Object
Credentials consist of an "account" and "token". The account is your flowthings.io username. The token is either:
This class also gives a convenience method for retrieving credentials from IBM Bluemix
// Using vanilla credentials
Credentials creds = new Credentials("matt", "SSOjDZ4VMHS2JcwT1sIpE8x91QfG");
// Or get from Bluemix, or revert to provided if not available
Credentials bluemixCreds = Credentials.fromBluemixOrDefault(creds);
RestApi api = new RestApi(bluemixCreds);
}
| Constructor and Description |
|---|
Credentials() |
Credentials(String account,
String token) |
| Modifier and Type | Method and Description |
|---|---|
static Credentials |
fromBluemixOrDefault(Credentials defaultCredentials)
Will attempt to get credentials from the IBM Bluemix environment.
|
static void |
main(String[] args) |
String |
toString() |
public static Credentials fromBluemixOrDefault(Credentials defaultCredentials)
defaultCredentials - - to be used if Bluemix credentials cannot be sourcedpublic static void main(String[] args)
Copyright © 2015. All rights reserved.