you are right, this example is very simplified and does not show how to pass data from the client credentials to the POST request.
The easiest way would be to check out all the methods the ClientCredentialsData object gives you (see https://github.com/hivemq/hivemq-spi/blob/master/src/main/java/com/dcsquare/hivemq/spi/security/ClientCredentialsData.java or https://github.com/hivemq/hivemq-spi/blob/master/src/main/java/com/dcsquare/hivemq/spi/security/ClientData.java) and then just pass all relevant parameters to the Apache HTTPClient. If you are interested how to implement that with HTTPClient, take a look at this link: https://hc.apache.org/httpcomponents-client-ga/quickstart.html
Hope this helps!
Dominik
Thanks
Gianluca