I use android example The connection is successfully established. But how to use it for authentication? Can be used to obtain a token or authenticator?
Asked
Active
Viewed 514 times
0
-
You may want to figure out how to configure IIS to accept LDAP-based authentication. From the LDAP client perspective, you will likely use the bind method in the LDAPConnection class (see http://static.javadoc.io/com.unboundid/unboundid-ldapsdk/3.1.1/com/unboundid/ldap/sdk/LDAPConnection.html#bind(java.lang.String, java.lang.String) – Bertold Kolics Jul 12 '16 at 14:02
-
Yes c= new LDAPConnection(address,port,bindDN,password); c.setConnectionName("Demo Connection"); IIS configed: http://s017.radikal.ru/i433/1607/f5/637d4575784d.png How do I use this connection to authenticate a web service? You need to get in the request header something like “Authorization: NTLM TlRMTVNTUAABAAAAAYIIogAAAAAoAAAAAAAAACgAAAAFASgKAAAADw==” We need to get as: http://s50.radikal.ru/i129/1607/f4/598d28b62215.png Here is the code that makes a request for service Rest. This is necessary as the add LdapConnection? http://s017.radikal.ru/i425/1607/d9/0ebc9c352b0c.png – Vadim Seleznev Jul 14 '16 at 13:38
-
Vadim - it is hard to follow what you are looking for. Could you, please, elaborate. – Bertold Kolics Jul 15 '16 at 19:14
-
I have a web service (Rest service) with Windows authentication, it is in a Windows domain. I develop a native app for Android devices (not the browser). How to authenticate with the device to web service and receive json package? I have everything working on an anonymous authentication, but can not establish a windows domain authentication. Advised UnboundId LDAPConnection, I made the connection "new LDAPConnection (address, port, bindDN, password)". Yes, it normally goes, but it does not solve my problem. How use LDAPConnection to access the web service? Or maybe there is another way? – Vadim Seleznev Jul 20 '16 at 12:53
-
From the device to the web service, you will not be able to use LDAPConnection as your device is talking over HTTP. You have to parse the Authorization header and get the username / password or client credentials out of it. To authenticate with that information to an LDAP server, you need a few extra steps: you need to map the username (most typical) to a DN in the LDAP server and authenticate using that DN and the password. You would probably create a session for your client so that you don't have to redo the authentication for each REST call. – Bertold Kolics Jul 21 '16 at 15:06
-
@VadimSeleznev following your question, I used the same example as a lead however, I cannot establish a connection to my LDAP Server, how did you establish a connection to yours and if you solved your authentication problem can you show me how you did it? This is the error I get: _Simple bind operations are not allowed to contain a bind DN without a password._ – Sweetie Anang Jul 27 '16 at 13:49