Dear Formspider team,

How can I get OS username of client ?

asked 25 Jul '13, 08:30

Khayyam's gravatar image

Khayyam
134
accept rate: 0%


Hi Khayyam,

In a web application, it is not possible to retrieve the OS user name of a client machine from the server. The closest you can get is the IP address. You can get the IP address of the client using api_session.getUserIP.

Kind Regards,
Yalim

link

answered 25 Jul '13, 08:57

Yalim's gravatar image

Yalim ♦♦
2.8k5
accept rate: 23%

Hi Yalim,

I know about api_session.getUserIP, but the problem is the clients uses Thin Client. So IP is the same for all of them... I need to get username in order to manage their sessions... Is this can be implemented? or its impossible at all ?

Thanks.

(25 Jul '13, 09:04) Khayyam

good question by the way. As far as I understand there is no way to perform that without creating a "login" logic. The nice way to do that is to use Windows AD logins (if it is a windows network of course). But the question is if FS can integrate with AD?

(25 Jul '13, 09:53) anatoly4u

Hi Anatoly, If you can talk to AD from the Oracle Database, FS will work with it. FS can integrate with any LDAP repository. Here is the relevant tutorial: http://theformspider.com/learningcenter/tutorial-11-how-to-use-ldap-as-a-base-for-user-management/

(25 Jul '13, 09:59) Yalim Gerger ♦♦

Dear Yalim,

I know about this tutorial, but this is not what I need. This solution is too complex. I dont need all these stuff. I just need OS username. Even if i don't have login logic/panel.

You are getting IP and sometimes this is so helpful.. But in such kind of situations IP doesn't help.. We need OS username. Can you implement this ?

(25 Jul '13, 11:00) Khayyam

Dear Khayyam, This is not a limitation of Formspider. Browsers don't share this information with the server.

(25 Jul '13, 11:02) Yalim ♦♦

Hi Khayyam,

You could call a javascript function through an external method to get the user name. Javascript function content something like:

var wshshell=new ActiveXObject("wscript.shell");
var username=wshshell.ExpandEnvironmentStrings("%username%");

Just not very secure if you want to use it for authentication though....

Best, Michiel A

link

answered 25 Jul '13, 17:18

Michiel%20A's gravatar image

Michiel A
5161542
accept rate: 13%

I don't recommend this since using ActiveXObject is only supported on IE.

(26 Jul '13, 05:53) oskansavli ♦♦

Hi Oskan,

You are right. I didn't think about that last evening (probably should not post solutions that late at night ;)

(26 Jul '13, 05:55) Michiel A

If the app is an internal app that runs only in the company intranet and IE is the only browser that runs on company PC's, this is a valid option. There are many organizations that fit this description.

(26 Jul '13, 05:59) Yalim Gerger ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×1
×1

Asked: 25 Jul '13, 08:30

Seen: 1,011 times

Last updated: 26 Jul '13, 05:59

Related questions


© Copyright Gerger 2017