Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 85A27200B51 for ; Mon, 1 Aug 2016 10:37:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 841A8160A65; Mon, 1 Aug 2016 08:37:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CB87B160A5D for ; Mon, 1 Aug 2016 10:37:21 +0200 (CEST) Received: (qmail 57979 invoked by uid 500); 1 Aug 2016 08:37:21 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 57967 invoked by uid 99); 1 Aug 2016 08:37:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Aug 2016 08:37:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 6F1AD2C027F for ; Mon, 1 Aug 2016 08:37:20 +0000 (UTC) Date: Mon, 1 Aug 2016 08:37:20 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HTTPCLIENT-1748) When run in java applet, SystemDefaultCredentialsProvider fails to get authentication from Authenticator MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 01 Aug 2016 08:37:22 -0000 [ https://issues.apache.org/jira/browse/HTTPCLIENT-1748?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D15401713#comment-15401713 ]=20 Oleg Kalnichevski commented on HTTPCLIENT-1748: ----------------------------------------------- bq. is it ok to use httpRequest.getRequestLine().getUri() instead ? Yes, it is.=20 Oleg > When run in java applet, SystemDefaultCredentialsProvider fails to get au= thentication from Authenticator > -------------------------------------------------------------------------= ------------------------------- > > Key: HTTPCLIENT-1748 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-174= 8 > Project: HttpComponents HttpClient > Issue Type: Improvement > Components: HttpClient > Affects Versions: 4.5 > Environment: Windows, application running in a java applet starte= d by firefox, connection to a remote server via a squid proxy with basic au= thentication > Reporter: S=C3=A9bastien Caille > Priority: Trivial > Fix For: 5.0 > > > Hello, > The java applets are deprecated, but the issue may impact other use cases= . > During a POST call made from a java applet via a proxy server with basic = authentication, SystemDefaultCredentialsProvider.getSystemCreds(...) calls = Authenticator.requestPasswordAuthentication, which wrongly returns "null" a= uthentication. > The java applet console shows that a NullPointerException was ignored. > I managed to fix the issue by providing the following values to Authentic= ator.requestPasswordAuthentication (getSystemCreds is currently providing n= ull for those ones ): > prompt =3D authscope.getRealm() > url =3D context.getAttribute(HttpClientContext.HTTP_TARGET_HOST) > Both values are needed ( prompt =3D=3D null && url !=3D null -> dialog bo= x asking for credentials, prompt !=3D null && url =3D=3D null -> crashes fi= refox) > Note that when downloading the applet jar files, the java is providing va= lues for all the parameters of Authenticator.requestPasswordAuthentication = (according to a breakpoint in requestPasswordAuthentication). > Thanks -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org