Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9668D182E9 for ; Fri, 14 Aug 2015 13:01:46 +0000 (UTC) Received: (qmail 69355 invoked by uid 500); 14 Aug 2015 13:01:46 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 69318 invoked by uid 500); 14 Aug 2015 13:01:46 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 69262 invoked by uid 99); 14 Aug 2015 13:01:46 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Aug 2015 13:01:46 +0000 Date: Fri, 14 Aug 2015 13:01:46 +0000 (UTC) From: "Berto Murillo (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (CXF-6540) AbstractAccessTokenValidator property and setter out-of-sync MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-6540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14696965#comment-14696965 ] Berto Murillo edited comment on CXF-6540 at 8/14/15 1:01 PM: ------------------------------------------------------------- Correct, what I see is this when trying to configure the XML: {code} Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'tokenHandlers' of bean class [org.apache.cxf.rs.security.oauth2.filters.OAuthRequestFilter]: Bean property 'tokenHandlers' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? {code} I believe the setter has to match the name of the variable. was (Author: mstberto): Correct, what I see is this when trying to configure the XML: {code} Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'tokenHandlers' of bean class [org.apache.cxf.rs.security.oauth2.filters.OAuthRequestFilter]: Bean property 'tokenHandlers' is not writable or has an invalid setter method. Does the parameter type of the setter mreturn type of the getter? {code} I believe the setter has to match the name of the variable. > AbstractAccessTokenValidator property and setter out-of-sync > ------------------------------------------------------------ > > Key: CXF-6540 > URL: https://issues.apache.org/jira/browse/CXF-6540 > Project: CXF > Issue Type: Bug > Components: JAX-RS Security > Affects Versions: 3.1.2 > Reporter: Berto Murillo > Labels: oauth2, security > > The setters and the property name do not match for the following: > Class: org.apache.cxf.rs.security.oauth2.services.AbstractAccessTokenValidator > Property: > {code} > private List tokenHandlers = Collections.emptyList(); > {code} > Setter(s): > {code} > public void setTokenValidator(AccessTokenValidator validator) { > setTokenValidators(Collections.singletonList(validator)); > } > > public void setTokenValidators(List validators) { > tokenHandlers = validators; > for (AccessTokenValidator handler : validators) { > supportedSchemes.addAll(handler.getSupportedAuthorizationSchemes()); > } > } > {code} > This means you cannot set the property via the XML, although you should still be able to override the class, set the property, and reference the new class in the XML. -- This message was sent by Atlassian JIRA (v6.3.4#6332)