Author: asoldano
Date: 2014-10-24 11:08:21 -0400 (Fri, 24 Oct 2014)
New Revision: 19031
Modified:
stack/cxf/trunk/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSeverInInterceptor.java
stack/cxf/trunk/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSubjectCreatingInitInterceptor.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreatingPolicyInterceptor.java
Log:
[JBWS-3850] Move SubjectCreatingPolicyInterceptor to PRE_PROTOCOL interceptor phase
Modified:
stack/cxf/trunk/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSeverInInterceptor.java
===================================================================
---
stack/cxf/trunk/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSeverInInterceptor.java 2014-10-24
14:14:55 UTC (rev 19030)
+++
stack/cxf/trunk/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSeverInInterceptor.java 2014-10-24
15:08:21 UTC (rev 19031)
@@ -49,6 +49,7 @@
{
super(Phase.PRE_PROTOCOL);
addAfter(SAAJInInterceptor.class.getName());
+
addBefore("org.jboss.wsf.stack.cxf.security.authentication.JaspiSubjectCreatingInterceptor");
this.authManager = authManager;
}
Modified:
stack/cxf/trunk/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSubjectCreatingInitInterceptor.java
===================================================================
---
stack/cxf/trunk/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSubjectCreatingInitInterceptor.java 2014-10-24
14:14:55 UTC (rev 19030)
+++
stack/cxf/trunk/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSubjectCreatingInitInterceptor.java 2014-10-24
15:08:21 UTC (rev 19031)
@@ -37,7 +37,7 @@
private final JBossAuthenticationManager authenticationManger;
public JaspiSubjectCreatingInitInterceptor(String securityDomain) {
- super(Phase.PRE_INVOKE);
+ super(Phase.PRE_PROTOCOL);
this.addBefore("org.jboss.wsf.stack.cxf.security.authentication.JaspiSubjectCreatingInterceptor");
authenticationManger = new JBossAuthenticationManager(securityDomain, new
JBossCallbackHandler());
}
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreatingPolicyInterceptor.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreatingPolicyInterceptor.java 2014-10-24
14:14:55 UTC (rev 19030)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreatingPolicyInterceptor.java 2014-10-24
15:08:21 UTC (rev 19031)
@@ -35,6 +35,7 @@
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;
import org.apache.cxf.security.SecurityContext;
+import org.apache.cxf.ws.security.wss4j.UsernameTokenInterceptor;
import org.apache.wss4j.common.principal.UsernameTokenPrincipal;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.security.SecurityDomainContext;
@@ -55,7 +56,13 @@
public SubjectCreatingPolicyInterceptor()
{
- super(Phase.PRE_INVOKE);
+ this(Phase.PRE_PROTOCOL);
+ addAfter(UsernameTokenInterceptor.class.getName());
+ }
+
+ public SubjectCreatingPolicyInterceptor(String phase)
+ {
+ super(phase);
helper.setPropagateContext(true);
}