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

StackOverflow https://stackoverflow.com/questions/8524768

سؤال

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

هل كانت مفيدة؟

المحلول 2

I resolved my problem using 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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top