Get username of logged in user in os via browser

2019-07-15 11:21发布


is there any possibility to get the username (loginname) from os x via webbrowser? my requiremnets are: a webform should send the name of the logged in user via email. it is for an intranet to subscribe for courses. (no login on the website)

is this possible or not?

3条回答
手持菜刀,她持情操
2楼-- · 2019-07-15 11:32

Check your web server configuration documentation. With many of them, you can enable authentication that integrates with your domain or LDAP services, Kerberos and similar. This may well allow you to do the kind of "single sign-on" you're talking about, at least with browsers that support the method you choose (and this being intranet, presumably you can constrain browser choice a bit — at least for convenience features like not having to log in again). Once authenticated, you should have the username or similar available.

You can only do that if you're both (server and client) authenticating against the same authentication host (or hosts that are allied), which is what keeps this from being a privacy nightmare — this is an intranet thing.

You may want to drop a question over at serverfault.com listing your server software, server operating environment, and the browsers you want to support, and see if anyone can help you with single sign-on.

查看更多
该账号已被封号
3楼-- · 2019-07-15 11:38

Nope, that would be somewhat of an invasion of privacy. You need to ask the user for that information on your website using a form.

查看更多
Animai°情兽
4楼-- · 2019-07-15 11:49

Definitely not in a way that is compatible with all browsers on all operating systems.

查看更多
登录 后发表回答