on-internet
← Community

authenticate with ntlm (or kerberos) using java UrlConnection

Stack Overflow ·

I need to consume a rest web service with java, passing the credentials of a domain user account. right now I'm doing it with classic asp set xmlHttp = server.createObject( "msxml2.serverxmlhttp" ) xmlHttp.open method, url, false, domain & "\" & user, password xmlHttp.send body out = xmlHttp.responseText set xmlHttp = nothing and with asp.net HttpWebRequest request = (HttpWebRequest) WebRequest.Create( url ); request.Credentials = new NetworkCredential(user, password, domain); request.Method = WebRequestMethods.Http.Get HttpWebResponse response = (HttpWebResponse) request.GetResponse(); Stream

Comments

Sign in or sign up to comment and upvote.

No comments yet.