When I try either of those other ways, I get error messages (see attached).
When you say, “are you sure that the name is correct”, what do you mean? This is using database table authentication, so (I assume that) the security.login() call doesn’t know any user names yet – I’m letting the system know who is logging in.
Those were the arguments being passed to security.login(), before the two tests above. It’s the line that is commented out. When I trace, I see the values. Is that what you mean?
It still returns false (see attached). Any more thoughts on things to try? Perhaps there is something really obvious I’ve overlooked? I notice that the warning message says something about needing an object rather than a string argument.
When ‘Designer’ is the display name and the uuid and groups are correct I don’t see why this would fail.
I did notice though that the tooltip says that the uuid must be an Object.
A String value is an Object as well so I guess this only means that you can use different data types.
What do you mean by “correct” – is the command checking against some other reference before it returns true? What would cause this command to return false instead of true?
I’m getting a “server not found” for the Servoy Wiki right now. I have read the discussion of custom login solutions a few times now, and I think that I remember most of it. I also (loosely) based my login solution code on the servoy_security solution.
I thought that the purpose of the security.login command in the authentication method was for Servoy to move the user from the login page to the first form of the solution itself. The developer is responsible for any validation of the user name and password, prior to calling security.login(). So what additional validation would this command perform?
Is anyone else using security.login() with a custom authentication method?
I only have a test user on my server and that fails as well with the authentication and login to be honest…
That is why I (also) think that the user has to be know in Servoy (like in older security setup).
security.login requires a non-null, non-empty array of strings as group names, all these groups have to exist.
Your code uses group Administrator, does this group exist?
Maybe it is a typo, Servoy comes with a standard group called Administrators.
When security.login fails because of unknown group, you should see a message in the log file like:
Could not log in user for unknown group ‘Administrator’"
That solved the problem. Because I’m doing custom security, I didn’t realize that I still needed to create the users and groups in the structure of the program (“User/Group Editor”). I thought that I would manage this completely on my own with the data tables, and that Servoy would simply pass back the user UID I would give it, to the onSolutionOpen method in the main application.
Thanks very much, this issue had been a hindrance for some time.