GGD/src/main/java/SecurityToken.java

28 lines
711 B
Java

import HttpCall.HttpPost;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;
public class SecurityToken {
public static String OnCallMethod(String username, String password) throws Exception {
//CONFIG PARAMETERS:
//BEGIN------------CONFIG PARAMETERS BELOW TO YOUR ENVIRONMENT---------------------------------------
String baseURL = "https://api.whysor.com/users/login";
final String body = String.format("{\"email\": \"%s\", \"password\": \"%s\", \"domain\": \"my.yookr.org\"}", username, password);
HttpPost httpMethodPost = new HttpPost();
return httpMethodPost.HttpCallPost(baseURL, body);
}
}