After further checking, turns out my JAR had been corrupted for some reason. I built it again and it works now.
For the benefit of anyone from the community who attempt to try this, I'll post the steps I did (working with APIM 1.10.0)
1) The JAR file:
$ cd /home/olahav/wso2/wso2am-1.10.0/repository/components/lib
$ jar tf extensions.jar
...
org/wso2/carbon/test/OferAPIAuthenticationHandler_1.class
2) The API template:
<handlers xmlns="http://ws.apache.org/ns/synapse">
<handler class="org.wso2.carbon.test.OferAPIAuthenticationHandler_1"/>
#foreach($handler in $handlers)
<handler xmlns="http://ws.apache.org/ns/synapse" class="$handler.className">
#if($handler.hasProperties())
#set ($map = $handler.getProperties() )
#foreach($property in $map.entrySet())
<property name="$!property.key" value="$!property.value"/>
#end
#end
</handler>
#end
</handlers>
3) Since this is a template, need to re-create the API. Then checking in the service view (via https://localhost:9443/carbon) you can see the handler added to the list of handlers:
<handlers>
<handler class="org.wso2.carbon.test.OferAPIAuthenticationHandler_1"/>
<handler class="org.wso2.carbon.apimgt.gateway.handlers.security.CORSRequestHandler">
<property name="apiImplementationType" value="ENDPOINT"/>
</handler>
<handler class="org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler"/>
<handler class="org.wso2.carbon.apimgt.gateway.handlers.throttling.APIThrottleHandler">
<property name="id" value="A"/>
<property name="policyKeyResource" value="gov:/apimgt/applicationdata/res-tiers.xml"/>
<property name="policyKey" value="gov:/apimgt/applicationdata/tiers.xml"/>
<property name="policyKeyApplication" value="gov:/apimgt/applicationdata/app-tiers.xml"/>
</handler>
<handler class="org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageHandler"/>
<handler class="org.wso2.carbon.apimgt.usage.publisher.APIMgtGoogleAnalyticsTrackingHandler">
<property name="configKey" value="gov:/apimgt/statistics/ga-config.xml"/>
</handler>
<handler class="org.wso2.carbon.apimgt.gateway.handlers.ext.APIManagerExtensionHandler"/>
</handlers>
That's it!
Thanks for anyone who helped me through.