To install the function on the Sun Java System Web Server, add the following Init directive to magnus.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
Note that this function does not actually enforce authorization requirements, it only takes given information and tells the server if it's 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"