Servoy 6 Security Login

Questions, tips and tricks and techniques for scripting in Servoy

Servoy 6 Security Login

Postby dpearce » Sun Aug 07, 2011 12:01 pm

Hi,

I am trying to get to grips with having to use the enhanced security in 6.

So I have changed my login form (using a database search) to be the login for in the solution.

I have defined a group called 'Experts' and I have written the following code:

Code: Select all
var groups = new Array()
            groups[0] = 'Experts'; //normally these groups are for example received from LDAP
            var user_uid = globals.userid; //also this uid might be received from external authentication method
            var ok = security.login(globals.username, user_uid, groups)
            if (!ok) {
               plugins.dialogs.showErrorDialog('Login failure', 'Already logged in? or no user_uid/groups specified?', 'OK')
            }


The username is a string, the globals.userid defined from searching my table based on username and password.

This triggers a ok=false and the error as if I am already logged in, but I am not.

Any clues, otherwise my solution brings up the servoy form when i put it onto the production server.

David
dpearce
 
Posts: 469
Joined: Sun Dec 03, 2006 11:53 am

Re: Servoy 6 Security Login

Postby lwjwillemsen » Sun Aug 07, 2011 12:50 pm

Hi David,

With Servoy enhanced security enabled you must use an authentication module with which you communicate from within the login form.

Read the Servoy Wiki on this...

Regards,
Lambert Willemsen
Vision Development BV
lwjwillemsen
 
Posts: 680
Joined: Sat Mar 14, 2009 5:39 pm
Location: The Netherlands


Return to Methods

Who is online

Users browsing this forum: No registered users and 15 guests