Search code examples
javagwtactive-directoryjcifs

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 :)


Solution

  • I resolved my problem using Waffle - Authentication Framework.