you're missing a point: separation of what is executed by python and what is executed by javascript.
user_signature takes into consideration a/c/f , args AND vars.
your URL link in the onkeyup attribute is generated by python, but then ajax() takes the values presented in the form (in your case, while the user is typing values) and post those to the original URL (as vars).
python can't know in advance what values the user will type, and javascript (ajax()) can't sign the "resulting url" because of two things:
- it doesn't know what hmac_key to use ('cause only the server knows what is it, that's the whole point of user_signature)
- it doesn't know HOW to create the signature
If you need signed URLs, you need to verify the url without taking vars into consideration.
Please review the book about the signature process...
http://web2py.com/books/default/chapter/29/04/the-core?search=signed#Digitally-signed-urlsBTW: auth.requires_signature() takes hash_vars as a parameter too.