Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 18306 invoked from network); 2 Dec 2002 14:08:29 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 2 Dec 2002 14:08:29 -0000 Received: (qmail 1733 invoked by uid 97); 2 Dec 2002 14:09:15 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 1686 invoked by uid 97); 2 Dec 2002 14:09:14 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 1672 invoked by uid 98); 2 Dec 2002 14:09:14 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) From: "Andreas Probst" To: "Tomcat Users List" Date: Mon, 02 Dec 2002 15:08:46 +0100 MIME-Version: 1.0 Subject: RE: Retrieving username and password from url?? Message-ID: <3DEB777E.11065.1E4F98@localhost> Priority: normal In-reply-to: <88500E0F870AA542B6340D8BC05A9E1B0AD175@rup.hugsmidjan.is> X-mailer: Pegasus Mail for Windows (v4.02a) Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: Quoted-printable Content-description: Mail message body X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Reynir, how can you get the Authentication header? As far as I know the only information you can get is the Principal and the username, but not the password, neither clear nor encoded. Andreas On 2 Dec 2002 at 9:14, Reynir H=FCbner wrote: > Hi, > > Depending on the browser and authentication scheme this will may > try to authenticate against tomcat. There for you should be able > to do request.getRemoteUser() on (at least) the first request > that has the authenticative username:password. > request.getRemoteUser() only returns the username, you can get > the Authentication header wich is formed like this in BASIC > authentication scheme: String user_Password =3D login+ ":"+ > password; String encoding =3D new String > (Base64.encode(user_Password.getBytes())); String Authentication > =3D "Basic " + encoding; > > You might be able to do that backwards somehow.... > > Hope it helps > -reynir > > > > -----Original Message----- > > From: Abhishek Srivastava [mailto:absrivas@cisco.com] > > Sent: 2. desember 2002 08:30 > > To: tomcat-user@jakarta.apache.org > > Cc: Sunu Joseph > > Subject: Retrieving username and password from url?? > > > > > > Hi, > > Is there a way that I can retrieve the username and password > > from the url given as below using a servlet. > > https://username:password@hostname/servletname> /servlet > > > > > > > > Regards, > > Abhishek > > > > > > > > > > -- To unsubscribe, e-mail: For additional commands, e-mail: