You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2015/08/06 12:00:17 UTC
cxf git commit: [CXF-6521] Making RS SAML Interceptors constructor
accepting a custom phase
Repository: cxf
Updated Branches:
refs/heads/master 82e40f03f -> 54ae15322
[CXF-6521] Making RS SAML Interceptors constructor accepting a custom phase
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/54ae1532
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/54ae1532
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/54ae1532
Branch: refs/heads/master
Commit: 54ae153226739bbe4d3166291e137e600158373c
Parents: 82e40f0
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Thu Aug 6 10:59:59 2015 +0100
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Thu Aug 6 10:59:59 2015 +0100
----------------------------------------------------------------------
.../cxf/rs/security/saml/AbstractSamlOutInterceptor.java | 9 ++++-----
.../apache/cxf/rs/security/saml/SamlFormOutInterceptor.java | 9 +++++++++
.../cxf/rs/security/saml/SamlHeaderOutInterceptor.java | 9 +++++++++
3 files changed, 22 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/54ae1532/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/AbstractSamlOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/AbstractSamlOutInterceptor.java b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/AbstractSamlOutInterceptor.java
index 71f140a..04a1032 100644
--- a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/AbstractSamlOutInterceptor.java
+++ b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/AbstractSamlOutInterceptor.java
@@ -26,7 +26,6 @@ import org.apache.cxf.common.util.Base64Utility;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
-import org.apache.cxf.phase.Phase;
import org.apache.wss4j.common.crypto.WSProviderConfig;
import org.apache.wss4j.common.saml.SamlAssertionWrapper;
@@ -38,10 +37,10 @@ public abstract class AbstractSamlOutInterceptor extends AbstractPhaseIntercepto
private boolean useDeflateEncoding = true;
- protected AbstractSamlOutInterceptor() {
- super(Phase.WRITE);
- }
-
+ protected AbstractSamlOutInterceptor(String phase) {
+ super(phase);
+ }
+
public void setUseDeflateEncoding(boolean deflate) {
useDeflateEncoding = deflate;
}
http://git-wip-us.apache.org/repos/asf/cxf/blob/54ae1532/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormOutInterceptor.java b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormOutInterceptor.java
index 757003e..3c784cf 100644
--- a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormOutInterceptor.java
+++ b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormOutInterceptor.java
@@ -34,6 +34,7 @@ import org.apache.cxf.helpers.DOMUtils;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
import org.apache.cxf.message.MessageContentsList;
+import org.apache.cxf.phase.Phase;
import org.apache.wss4j.common.saml.SamlAssertionWrapper;
import org.apache.wss4j.common.util.DOM2Writer;
@@ -42,6 +43,14 @@ public class SamlFormOutInterceptor extends AbstractSamlOutInterceptor {
LogUtils.getL7dLogger(SamlFormOutInterceptor.class);
private static final String SAML_ELEMENT = "SAMLToken";
+ public SamlFormOutInterceptor() {
+ this(Phase.WRITE);
+ }
+
+ public SamlFormOutInterceptor(String phase) {
+ super(phase);
+ }
+
public void handleMessage(Message message) throws Fault {
Form form = getRequestForm(message);
if (form == null) {
http://git-wip-us.apache.org/repos/asf/cxf/blob/54ae1532/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlHeaderOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlHeaderOutInterceptor.java b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlHeaderOutInterceptor.java
index c1e840c..2231e2a 100644
--- a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlHeaderOutInterceptor.java
+++ b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlHeaderOutInterceptor.java
@@ -34,6 +34,7 @@ import org.apache.cxf.helpers.CastUtils;
import org.apache.cxf.helpers.DOMUtils;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.Phase;
import org.apache.wss4j.common.saml.SamlAssertionWrapper;
import org.apache.wss4j.common.util.DOM2Writer;
@@ -41,6 +42,14 @@ public class SamlHeaderOutInterceptor extends AbstractSamlOutInterceptor {
private static final Logger LOG =
LogUtils.getL7dLogger(SamlHeaderOutInterceptor.class);
+ public SamlHeaderOutInterceptor() {
+ this(Phase.WRITE);
+ }
+
+ public SamlHeaderOutInterceptor(String phase) {
+ super(phase);
+ }
+
public void handleMessage(Message message) throws Fault {
try {
SamlAssertionWrapper assertionWrapper = createAssertion(message);