Hi
I am trying to use the ‘security.getSystemUserName’ function to pick up the client’s (Windows) system user name to authenticate.
This works for me fine in Developer on both Mac & Windows, but when deployed on Smart Clients running on Windows with Java 6, the function returns ‘system’ for whoever logs in…
Is this some new sandbox or security issue with Java Web Start??
Please can anyone help me with this???
I have just managed to test with Servoy 5.2.16 & also 7.3.1 rc and the same thing happens, so it isn’t a Servoy problem (I now assume, or if it is, then it is an issue all the way from 5.2.x to 7…3.x), but what is the point in this function if it’s not going to give anything useful (in Windows)??
I’d (& my client) love to get this to work as it would really help with Servoy usage.
Harjo:
I don’t know that function, but we do that with the it2be tools plugin!
Has worked ever since…
Thanks for the suggestion!
I did try it briefly, but it still seems to give the same username of ‘system’ back on Windows.
I needed to add some more ‘debug’ code in, but my copy of Servoy 5.2 got stuck on my Mac & then I had to leave client.
I will probably have to resume next week when I am there again.
Thanks
Rafi
jcompagner:
it just asks for the system property user.name:
System.getProperty(“user.name”);
thats something the vm sets and gets from the os on startup.
I don’t know about Java, but I know that when using developer, it works correctly, but then using client on Windows, any client, each with a different user name, returns the value ‘system’.
Thanks
Maybe at your customer, office, this is the case, but certainly not in our case.
We have a Saas solution, and use this already from Servoy 5 until Servoy 7, and still working perfectly.
Harjo:
Maybe at your customer, office, this is the case, but certainly not in our case.
We have a Saas solution, and use this already from Servoy 5 until Servoy 7, and still working perfectly.
thanks for your reply & sorry for not replying sooner, but I had not been back to client until today to try again.
It is still returning user ‘system’ for me here
I am using this code (with the old call commented out)
I don’t know if I got this across, but I am trying to do this in an ‘authenticator’ module called from a ‘login’ module, using servoy.application_server.enhancedSecurity = true (Servoy version 5.2.16 -build 1029)
Is this data not available at that point, am I being stupid (probably ), I wish I knew what I am doing wrong 8-(
Thanks
Rafi
[UPDATE]
Just investigating further.
It does seem that the username is returned differently when in ‘authenticator’ module than when in actual solution once started up…
I just added the same code into the main solution startup script and it returned the correct username (I added ‘system’ as a valid user to allow system to auto-login)
Will follow up shortly…
Rafi
That is clear. The authenticator runs on the server, so you get the server processes user name. You will have to pass the user name from the login solution to the authenticator if you need it there.
patrick:
That is clear. The authenticator runs on the server, so you get the server processes user name. You will have to pass the user name from the login solution to the authenticator if you need it there.
Oh how I wish I’d know/realised/been told this earlier
That fixed it!
I pass the username from login to authenticator and it all works beautifully now.
Happy client
Thanks all
Happy Holidays to all.
Rafi
[BTW, this is using the correct Servoy call from topic heading, NOT the IT2Be plugin (although of course that would work)]