First, the "security.authenticate()" method is using a String as second argument, which is the name of a method in the Authenticator module of you solution, (and there's no need to prefix this method name with "globals." since your Authenticator module should really have nothing but globals anyway!).
So your method should read:
- Code: Select all
security.authenticate("Authenticator","login", [varCuit,varClaveFiscal]);
Then, you don't call this from the Authenticator module itself, but from your Login module (usually from the login form of your Login module).
This is how the security is really 'enhanced':
Because you cannot access your Authenticator module differently than using the security.authenticate() method.
Also note that authenticate() returns an Object (meaning that it can be anything, and or example it can be a JSObject where you can put lots of information to be retrieved by the Login module - think of creating a User object, that will contain all relevant informations, like user ID, groups, name, etc.)
And finally, note that you can put many globals in your Authenticator module that will all be called the same way.
Hope this helps,