To install the function on the Sun Java System Web Proxy Server, add the following Init directive to obj.conf to load the compiled function:
Init fn=load-modules shlib=yourlibrary funcs=hardcoded-auth
Inside the default object in obj.conf, add the following AuthTrans directive:
AuthTrans fn=basic-auth auth-type="basic" userfn=hardcoded-auth userdb=unused
This function does not enforce authorization requirements. The function only takes given information and informs the server whether the information is correct or not. The PathCheck function require-auth performs the enforcement, so add the following PathCheck directive as well:
PathCheck fn=require-auth realm="test realm" auth-type="basic"