From fa51018b6c24f598ae8174afa183b0b46436e69b Mon Sep 17 00:00:00 2001 From: slaws Date: Mon, 15 Sep 2008 08:07:58 +0000 Subject: More work exploring the policy extension model by implementing a token based authentication schema across binding.ws and binding.jm. No authentication is actually performed here. That is left for users to provide their own policy interceptors. However tokens are passed and security Subjects/Principals are created. This exercise has highlighted some awkwardness in the process of building policy implementations. I'll post about this on the mail list. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@695374 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tuscany/sca/core/context/RequestContextImpl.java | 2 +- .../java/org/apache/tuscany/sca/core/invocation/MessageImpl.java | 6 +++--- .../apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'java/sca/modules/core/src/main') diff --git a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/context/RequestContextImpl.java b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/context/RequestContextImpl.java index aa69bb3ae5..0c5dc63a89 100644 --- a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/context/RequestContextImpl.java +++ b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/context/RequestContextImpl.java @@ -48,7 +48,7 @@ public class RequestContextImpl implements RequestContext { } public Subject getSecuritySubject() { - throw new UnsupportedOperationException(); + return (Subject)ThreadMessageContext.getMessageContext().getQoSContext().get(Message.QOS_CTX_SECURITY_SUBJECT); } public String getServiceName() { diff --git a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/MessageImpl.java b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/MessageImpl.java index 7d7fc583c3..4ce88f5e2e 100644 --- a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/MessageImpl.java +++ b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/MessageImpl.java @@ -32,7 +32,7 @@ import org.apache.tuscany.sca.runtime.EndpointReference; * @version $Rev $Date$ */ public class MessageImpl implements Message { - private Map header = new Hashtable(); + private Map headers = new Hashtable(); private Object body; private Object messageID; private boolean isFault; @@ -102,8 +102,8 @@ public class MessageImpl implements Message { return qosContext; } - public Map getHeader() { - return qosContext; + public Map getHeaders() { + return headers; } } diff --git a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java index 60f90fb6b5..c79fe46a7e 100644 --- a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java +++ b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java @@ -186,7 +186,7 @@ public class NonBlockingInterceptor implements Interceptor { return null; } - public Map getHeader() { + public Map getHeaders() { return null; } } -- cgit v1.2.3