Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1881E17C45 for ; Mon, 31 Aug 2015 16:42:22 +0000 (UTC) Received: (qmail 91743 invoked by uid 500); 31 Aug 2015 16:42:22 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 91677 invoked by uid 500); 31 Aug 2015 16:42:22 -0000 Mailing-List: contact commits-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 commits@cxf.apache.org Received: (qmail 91665 invoked by uid 99); 31 Aug 2015 16:42:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Aug 2015 16:42:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CE5B2DFE20; Mon, 31 Aug 2015 16:42:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: coheigea@apache.org To: commits@cxf.apache.org Message-Id: <66b1c33f6bbe4c76abf51c3925bfd686@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: cxf-fediz git commit: [FEDIZ-129] - Default values in the schema are not actually used Date: Mon, 31 Aug 2015 16:42:21 +0000 (UTC) Repository: cxf-fediz Updated Branches: refs/heads/1.2.x-fixes 42f597df3 -> b8e71c845 [FEDIZ-129] - Default values in the schema are not actually used Conflicts: pom.xml Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/b8e71c84 Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/b8e71c84 Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/b8e71c84 Branch: refs/heads/1.2.x-fixes Commit: b8e71c845299fe48617bd5adadc8093d3beb1eed Parents: 42f597d Author: Colm O hEigeartaigh Authored: Mon Aug 31 17:15:44 2015 +0100 Committer: Colm O hEigeartaigh Committed: Mon Aug 31 17:42:10 2015 +0100 ---------------------------------------------------------------------- plugins/core/pom.xml | 34 ++++++++++---------- .../cxf/fediz/core/config/FedizContext.java | 6 ++-- .../src/main/resources/schemas/FedizConfig.xsd | 6 ++-- .../core/config/FedizConfigurationTest.java | 8 +++++ pom.xml | 11 ------- 5 files changed, 30 insertions(+), 35 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/b8e71c84/plugins/core/pom.xml ---------------------------------------------------------------------- diff --git a/plugins/core/pom.xml b/plugins/core/pom.xml index faaaf28..0d6f2d3 100644 --- a/plugins/core/pom.xml +++ b/plugins/core/pom.xml @@ -30,6 +30,7 @@ bundle UTF-8 + 3.0.5-SNAPSHOT @@ -77,30 +78,29 @@ - com.sun.tools.xjc.maven2 - maven-jaxb-plugin - 1.1.1 + org.apache.cxf + cxf-xjc-plugin + ${cxf.xjc-utils.version} - generate + xsdtojava - ${basedir}/src/main/resources - org.apache.cxf.fediz.core.config.jaxb - - **/FedizConfig.xsd - - - test*.xsd - - - *.xjb - - true - true + + + ${basedir}/src/main/resources/schemas/FedizConfig.xsd + org.apache.cxf.fediz.core.config.jaxb + + -Xdv + + + + + org.apache.cxf.xjcplugins:cxf-xjc-dv:${cxf.xjc-utils.version} + http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/b8e71c84/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FedizContext.java ---------------------------------------------------------------------- diff --git a/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FedizContext.java b/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FedizContext.java index f537dcb..e05d8bf 100644 --- a/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FedizContext.java +++ b/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FedizContext.java @@ -178,9 +178,8 @@ public class FedizContext implements Closeable { } keyManager = new KeyManager(config.getSigningKey()); Properties sigProperties = createCryptoProperties(config.getSigningKey()); - Crypto crypto; try { - crypto = CryptoFactory.getInstance(sigProperties); + Crypto crypto = CryptoFactory.getInstance(sigProperties); keyManager.setCrypto(crypto); } catch (WSSecurityException e) { String name = keyManager.getName(); @@ -202,9 +201,8 @@ public class FedizContext implements Closeable { } decryptionKeyManager = new KeyManager(config.getTokenDecryptionKey()); Properties decProperties = createCryptoProperties(config.getTokenDecryptionKey()); - Crypto crypto; try { - crypto = CryptoFactory.getInstance(decProperties); + Crypto crypto = CryptoFactory.getInstance(decProperties); decryptionKeyManager.setCrypto(crypto); } catch (WSSecurityException e) { String name = decryptionKeyManager.getName(); http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/b8e71c84/plugins/core/src/main/resources/schemas/FedizConfig.xsd ---------------------------------------------------------------------- diff --git a/plugins/core/src/main/resources/schemas/FedizConfig.xsd b/plugins/core/src/main/resources/schemas/FedizConfig.xsd index 5364dcb..19922c6 100644 --- a/plugins/core/src/main/resources/schemas/FedizConfig.xsd +++ b/plugins/core/src/main/resources/schemas/FedizConfig.xsd @@ -16,7 +16,7 @@ - + @@ -85,9 +85,9 @@ - + - Decision weather the token validation (e.g. lifetime) shall be + Decision whether the token validation (e.g. lifetime) shall be performed on every request (true) or only once at initial authentication (false). http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/b8e71c84/plugins/core/src/test/java/org/apache/cxf/fediz/core/config/FedizConfigurationTest.java ---------------------------------------------------------------------- diff --git a/plugins/core/src/test/java/org/apache/cxf/fediz/core/config/FedizConfigurationTest.java b/plugins/core/src/test/java/org/apache/cxf/fediz/core/config/FedizConfigurationTest.java index 8c379d6..dd3780d 100644 --- a/plugins/core/src/test/java/org/apache/cxf/fediz/core/config/FedizConfigurationTest.java +++ b/plugins/core/src/test/java/org/apache/cxf/fediz/core/config/FedizConfigurationTest.java @@ -401,5 +401,13 @@ public class FedizConfigurationTest { return fedContext.getTokenReplayCache(); } + + @org.junit.Test + public void testDefaultValues() throws JAXBException, IOException { + ContextConfig config = new ContextConfig(); + + Assert.assertTrue(config.getMaximumClockSkew().intValue() == 5); + Assert.assertTrue(config.isTokenExpirationValidation()); + } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/b8e71c84/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index b0a01c2..583eb7d 100644 --- a/pom.xml +++ b/pom.xml @@ -86,14 +86,6 @@ - - 2.1 - 2.1.13 - 2.1.13 - 2.2.6 - 2.2.5 - 2.2.5 - true @@ -765,9 +757,6 @@ 1.7 - ${fediz.jaxb22.version} - ${fediz.jaxb22.impl.version} - ${fediz.jaxb22.impl.version} 1.6