Return-Path: X-Original-To: apmail-chemistry-dev-archive@www.apache.org Delivered-To: apmail-chemistry-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ABC776A10 for ; Mon, 30 May 2011 16:24:29 +0000 (UTC) Received: (qmail 62977 invoked by uid 500); 30 May 2011 16:24:29 -0000 Delivered-To: apmail-chemistry-dev-archive@chemistry.apache.org Received: (qmail 62946 invoked by uid 500); 30 May 2011 16:24:29 -0000 Mailing-List: contact dev-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list dev@chemistry.apache.org Received: (qmail 62938 invoked by uid 99); 30 May 2011 16:24:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 May 2011 16:24:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 May 2011 16:24:28 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 3DECBE97B2 for ; Mon, 30 May 2011 16:23:48 +0000 (UTC) Date: Mon, 30 May 2011 16:23:48 +0000 (UTC) From: "Peter Monks (JIRA)" To: dev@chemistry.apache.org Message-ID: <222158983.53713.1306772628250.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <806874597.52708.1306729008492.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CMIS-379) Allow custom AuthenticationProvider's to be registered via dependency injection MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CMIS-379?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D130411= 87#comment-13041187 ]=20 Peter Monks commented on CMIS-379: ---------------------------------- The singleton I was referring to was CmisBindingFactory - it uses the class= ic "private constructor + static getInstance() method" singleton anti-patte= rn. > Allow custom AuthenticationProvider's to be registered via dependency inj= ection > -------------------------------------------------------------------------= ------ > > Key: CMIS-379 > URL: https://issues.apache.org/jira/browse/CMIS-379 > Project: Chemistry > Issue Type: Wish > Components: opencmis-client > Affects Versions: OpenCMIS 0.3.0 > Environment: n/a > Reporter: Peter Monks > Assignee: Florian M=C3=BCller > Fix For: OpenCMIS 0.4.0 > > > As documented at http://incubator.apache.org/chemistry/opencmis-client-bi= ndings.html, the only way to configure a custom AuthenticationProvider is t= o specify the fully-qualified classname as a String entry in the Session pa= rameters Map. This is a crude approach that (amongst other things) makes i= t very difficult to implement a custom AuthenticationProvider that itself h= as one or more dependencies. > The solution is to support (but not require, obviously) the dependency in= jection of custom AuthenticationProviders, either directly (can be injected= directly into the CmisBindingFactory) or indirectly (can be injected into = custom client code, and than passed either as a Session parameter or whatev= er to CmisBindingFactory). > From a brief perusal it appears there are at least two ways of achieving = this: > # allow an *instance* of an AuthenticationProvider to be provided in the = Session parameters Map. Note: this would require that the type of the Map = is modified from Map to Map, but this is pr= obably a good idea anyway as it seems unlikely that all Session parameters,= now and in the future, will always be Strings. > # add a setter to the CmisBindingFactory that allows the AuthenticationPr= ovider to be configured directly. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira