Authentication
How to use the license system for authentication.
🔐 Creating a simple Auth request
There are many ways to send a GET Request but this is the most simple way to do so
GET http://localhost:8080/api/v1/license/auth
This will send a GET request to the license server to authenticate.
Path Parameters
Name
Type
Description
license
String
This is the license that the user will need to authenticate
checksum
String
A checksum that is used to identify product version
product
String
The product name that is used to verify access
public static void main(String[] args) throws IOException {
Map<String, String> parameters = new HashMap<>();
parameters.put("token", "12345678910");
parameters.put("checksum", "CHECKSUM_VALUE");
parameters.put("license", "1234-1234-1234-1234");
parameters.put("product", "PRODUCT_NAME");
HttpURLConnection connection = (HttpURLConnection) new URL("http://<IP>:<PORT>>/api/v1/license/auth").openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Accept-Language", "en-US,en;q=0.5");
DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
wr.writeBytes(getParamsString(parameters));
wr.flush();
wr.close();
InputStream stream = connection.getInputStream();
StringBuilder response = new StringBuilder();
new BufferedReader(new InputStreamReader(stream)).lines().forEachOrdered(string -> {response.append(string);});
stream.close();
System.out.println(response.toString()); // Returns a JSON Value
}// Some codeLast updated