Conditions and configurable token enum.

It would probably be better just to change the URL of the submodule to use https instead.