You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by bu...@apache.org on 2004/11/08 11:56:05 UTC

DO NOT REPLY [Bug 32116] New: - Single sign-on problem

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32116>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32116

Single sign-on problem

           Summary: Single sign-on problem
           Product: HttpClient
           Version: 3.0 Alpha 2
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Commons HttpClient
        AssignedTo: httpclient-dev@jakarta.apache.org
        ReportedBy: julien.buret@augeo.com


I try to install a single sign-on process on Windows with HttpClient

The use of Sun URL class works fine :

		URL myUrl = new URL("http://127.0.0.1/test");
		InputStream stream = myUrl.openStream();
		StringWriter st=new StringWriter();
		int i=0;
		while( ( i=stream.read()) !=-1){
			st.write(i);
		}
		System.out.println(st.toString()); 

... And we obtain the expected response.

But HttpClient based code return a 401 Authorization Required error page :

			HttpClient client=new HttpClient();
			GetMethod get=new GetMethod("http://127.0.0.1/test");
			client.executeMethod(get);
			System.out.println(get.getResponseBodyAsString());

Ok, I know I can use

client.getParams().setParameter(CredentialsProvider.PROVIDER, new Prompt());

But the fact is  we don't want a prompt, we want single sign-on.

Configuration :

Windows 2000
Apache 2

httpd.conf : 

(...)
LoadModule sspi_auth_module modules/mod_auth_sspi.so
(...)	
NameVirtualHost *:80
<VirtualHost *:80>
	<IfModule mod_auth_sspi.c>
		<Location /test>
			AuthName "test"
			AuthType SSPI
			SSPIAuth On
			SSPIAuthoritative On
			SSPIOfferBasic Off
			require valid-user
		</Location>
	</IfModule>
</VirtualHost>

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org