Repository: cxf Updated Branches: refs/heads/master cd2c481ef -> 826bf21ae
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/a24540a8 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a24540a8 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a24540a8 Branch: refs/heads/master Commit: a24540a86cc014d34795414199993378d53cb4dd Parents: cd2c481 Author: Colm O hEigeartaigh <[email protected]> Authored: Thu Nov 19 14:27:39 2015 +0000 Committer: Colm O hEigeartaigh <[email protected]> Committed: Thu Nov 19 17:52:47 2015 +0000 ---------------------------------------------------------------------- .../policy/interceptors/STSTokenOutInterceptor.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/a24540a8/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<Message> { 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<Message> { 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() {
