Get Windows username in a legacy (not WebExtensions) Firefox add-on

前端 未结 5 1259
盖世英雄少女心
盖世英雄少女心 2020-11-29 07:17

I am working a Firefox add-on (which is written in JavaScript) and need to determine the Windows user currently logged on. Is there a way to do this?

5条回答
  •  天涯浪人
    2020-11-29 08:10

    Firefox already has Integrated Authentication built-in (many people don't know that).
    See: https://developer.mozilla.org/en-US/docs/Integrated_Authentication

    Here is a Popular Firefox addon that eases the configuration: https://addons.mozilla.org/nl/firefox/addon/integrated-auth-for-firefox/

    Here is some extra explanation:
    http://justgeeks.blogspot.nl/2011/01/firefox-supports-integrated-windows.html

    Good luck!

提交回复
热议问题