I followed the guide from
https://www.zaproxy.org/docs/developer/creating-new-addon-in-zap-extensions/ and created a new AddOn. My new addon is able to run in ZAP. For the addon, I use it for the active scan and inherited AbstractAppParamPlugin (reference from ascanrules). How do I check whether the session is valid and if is not valid, authenticate the user from context in the scan(HttpMessage msg, String param, String value) function?
Thanks.