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 B6592200C87 for ; Wed, 17 May 2017 15:20:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B51A4160BBA; Wed, 17 May 2017 13:20:11 +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 0CB4A160BCD for ; Wed, 17 May 2017 15:20:10 +0200 (CEST) Received: (qmail 36916 invoked by uid 500); 17 May 2017 13:20:09 -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 36831 invoked by uid 99); 17 May 2017 13:20:09 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 May 2017 13:20:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 88215185E72 for ; Wed, 17 May 2017 13:20:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.201 X-Spam-Level: X-Spam-Status: No, score=-99.201 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id f_VeT9WDEIUi for ; Wed, 17 May 2017 13:20:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 8415761051 for ; Wed, 17 May 2017 13:20:06 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id AB737E0DD7 for ; Wed, 17 May 2017 13:20:05 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id B4FCB263BD for ; Wed, 17 May 2017 13:20:04 +0000 (UTC) Date: Wed, 17 May 2017 13:20:04 +0000 (UTC) From: "ASF GitHub Bot (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: Wed, 17 May 2017 13:20:11 -0000 [ https://issues.apache.org/jira/browse/HTTPCLIENT-1748?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D16014012#comment-16014012 ]=20 ASF GitHub Bot commented on HTTPCLIENT-1748: -------------------------------------------- Github user asfgit closed the pull request at: https://github.com/apache/httpcomponents-client/pull/55 > 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 (classic) > 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 Alpha2 > > > 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.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org