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 E205F17D20 for ; Thu, 19 Nov 2015 17:53:34 +0000 (UTC) Received: (qmail 20462 invoked by uid 500); 19 Nov 2015 17:53:34 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 20368 invoked by uid 500); 19 Nov 2015 17:53:34 -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 20354 invoked by uid 99); 19 Nov 2015 17:53:34 -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; Thu, 19 Nov 2015 17:53:34 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4432AE17DA; Thu, 19 Nov 2015 17:53:34 +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 Date: Thu, 19 Nov 2015 17:53:34 -0000 Message-Id: <5c88dec314044293ad9dc7a800537345@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/5] cxf git commit: Some changes to the STSTokenOutInterceptor to make it easier to subclass Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 9680acf2e -> a9da42b02 Some changes to the STSTokenOutInterceptor to make it easier to subclass Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/7fdc3403 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/7fdc3403 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/7fdc3403 Branch: refs/heads/3.1.x-fixes Commit: 7fdc34030bdcfaa4226c28ea8ce83f34563a5b6d Parents: 9680acf Author: Colm O hEigeartaigh Authored: Thu Nov 19 14:27:39 2015 +0000 Committer: Colm O hEigeartaigh Committed: Thu Nov 19 17:53:19 2015 +0000 ---------------------------------------------------------------------- .../policy/interceptors/STSTokenOutInterceptor.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/7fdc3403/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/STSTokenOutInterceptor.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/STSTokenOutInterceptor.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/STSTokenOutInterceptor.java index 14b8b5f..f0683e0 100644 --- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/STSTokenOutInterceptor.java +++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/STSTokenOutInterceptor.java @@ -51,7 +51,11 @@ public class STSTokenOutInterceptor extends AbstractPhaseInterceptor { private TokenRequestParams tokenParams; public STSTokenOutInterceptor(AuthParams authParams, String stsWsdlLocation, Bus bus) { - super(Phase.PREPARE_SEND); + this(Phase.PREPARE_SEND, authParams, stsWsdlLocation, bus); + } + + public STSTokenOutInterceptor(String phase, AuthParams authParams, String stsWsdlLocation, Bus bus) { + super(phase); this.stsClient = configureBasicSTSClient(authParams, stsWsdlLocation, bus); this.tokenParams = new TokenRequestParams(); } @@ -79,6 +83,12 @@ public class STSTokenOutInterceptor extends AbstractPhaseInterceptor { if (tok == null) { LOG.warning("Security token was not retrieved from STS"); } + processToken(message, tok); + } + + // An extension point to allow custom processing of the token + protected void processToken(Message message, SecurityToken tok) { + } public STSClient getSTSClient() {