I created a plugin (Java) that have the following snippet:
String username = "abcdef";
String passowrd = "somepass";
String userName = URLEncoder.encode(username, "UTF-8");
String password = URLEncoder.encode(passowrd, "UTF-8");
String url = String.format("https://example.com?format=username=%s&password=%s", userName, password);
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder().url(url).build();
Response response = client.newCall(request).execute();
I would like to allow the user to change the username and pasword from within Confluence, so I have been struggling to use and know whether there is a way to store the username and password in Confluence (properties if there is such a thing), and then read them into the Java application in the plugin, the latter is not important.