wink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paulo Borges <abuda...@hotmail.com>
Subject Adding Authorization to http header using RestClient
Date Sun, 06 Jun 2010 22:18:14 GMT

Hello:

Our wink rest application is using container security (in Websphere). Basically any attempt
to access a resource is required to have an id and password. Normally in using java native
URL api, I use the following code to authenticate a user [say id mack and pwd wink4you] to
container:

String authorization = "mack:wink4you";
BASE64Encoder encoder = new sun.misc.BASE64Encoder();
URL url = new URL("http://localhost:9080/....");
HttpURLConnection urlc = (HttpURLConnection) url.openConnection();            
urlc.setRequestProperty("Authorization", "Basic "+ encoder.encode(authorization));

is there a way to achieve the above result using wink client api.
 		 	   		  
_________________________________________________________________
MSN Dating: Find someone special. Start now.
http://go.microsoft.com/?linkid=9734384
Mime
View raw message