简体   繁体   中英

How can I get user logon name in web application (in GWT) when I logged using Active Directory?

At first, sorry for my english :P

What I need? In my Web Application (I write in GWT, but can be JSP) I just need show Label: "Hi, John", where "John" is a user logon name, using Active Directory.

Can I do it in JCIFS?

Examples says:

<filter>
    <filter-name>NtlmHttpFilter</filter-name>
    <filter-class>jcifs.http.NtlmHttpFilter</filter-class>

    <init-param>
        <param-name>jcifs.http.domainController</param-name>
        <param-value>192.168.29.27</param-value>
    </init-param>

    <init-param>
        <param-name>jcifs.smb.client.domain</param-name>
        <param-value>DEMO</param-value>
    </init-param>
    <init-param>
        <param-name>jcifs.smb.client.username</param-name>
        <param-value>user</param-value>
    </init-param>
    <init-param>
        <param-name>jcifs.smb.client.password</param-name>
        <param-value>pass</param-value>
    </init-param>
</filter>

But I haven't user name / password. All I need is just user name :)

我使用Waffle-Authentication Framework解决了我的问题。

You need to use the ntlm protocol. using it with ie (since you are requesting ms user name) will give you the username. you don't need the password.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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