Inheriting from juce::OnlineUnlockStatus with non-XML responses

Hey everyone,

Started implementing unlocking/trial logic in a plugin of mine with server-side license validation. Naturally, my first instinct is to inherit from juce::OnlineUnlockStatus and use juce::OnlineUnlockForm for the form/input part.

However, I seem to be running into a quirky limitation of the juce::OnlineUnlockStatus interface. While the public function readReplyFromWebserver() is virtual and left to be implemented by the derived class, the attemptWebserverUnlock() function which calls readReplyFromWebserver (and is called from within juce::OnlineUnlockForm) makes a strict assumption that readReplyFromWebserver() will return XML.

This is documented which is great, but I am in a position where I am using a third party licensing SaaS that doesn’t provide me with XML responses. Sure, I can serialize my JSON to XML which will please attemptWebserverUnlock(), but I think the way forward here is to make attemptWebserverUnlock() virtual as well (with a default implementation? is that possible in C++? This is stretching my knowledge of inheritance).

The other little quirk in attemptWebserverUnlock() (say I now convert my server response to XML), is that when it fails to parse the response, it pings websites that still use HTTP and not HTTPS which is deprecated (and causes system warnings that require changing the plist file).

This all compounds to make juce::OnlineUnlockStatus not as easy to extend when used with juce::OnlineUnlockForm, especially when integrating with a serverside licensing service that doesn’t return XML.

Have others run into this? Did you just end up making your own logic/UI classes for authorization and unlocking? Or is there a way to overload juce::OnlineUnlockStatus::attemptWebserverUnlock() in an inherited class?