简体   繁体   English

如何使用动作脚本检查%USERNAME%

[英]How to check %USERNAME% using actionscript

My project I'm working on is a FLEX internal website that also can be logged into when trying to access from a remote location. 我正在处理的项目是FLEX内部网站,尝试从远程位置访问时也可以登录。 I'm trying to have it display the username of the current logged in windows user when they access the site locally. 我试图让它显示当前登录的Windows用户在本地访问站点时的用户名。 I have tried using NativeProcess to access the command line but that is unavailable when working with a web application. 我尝试使用NativeProcess访问命令行,但是在使用Web应用程序时不可用。 Any ideas on how I would be able to do this? 关于如何执行此操作的任何想法?

We do something like that where I work. 在我工作的地方,我们会做类似的事情。 Unfortunately, it doesn't use the frontend but makes a request to a backend process. 不幸的是,它不使用前端,而是向后端进程发出请求。 The suggestion I have only works through a vpn also if I recall correctly. 如果我没记错的话,我的建议也只能通过vpn起作用。 Basically, on my PHP backend, I allow Windows authentication, and then use the result of that COM object call to get data about the current user. 基本上,在我的PHP后端上,我允许Windows身份验证,然后使用该COM对象调用的结果来获取有关当前用户的数据。 I then send that data back to my Flex frontend, web or AIR and display that to the user as well as restrict access to various parts of the app. 然后,我将该数据发送回我的Flex前端,Web或AIR,并显示给用户,并限制对应用程序各个部分的访问。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM