1 21 22 package org.objectweb.jonas.security.interceptors.iiop; 23 24 import org.objectweb.security.context.SecurityContext; 25 import org.objectweb.security.context.SecurityCurrent; 26 import org.omg.IOP.ServiceContext ; 27 import org.omg.PortableInterceptor.ClientRequestInfo ; 28 import org.omg.PortableInterceptor.ClientRequestInterceptor ; 29 import org.omg.PortableInterceptor.ForwardRequest ; 30 import org.omg.PortableInterceptor.ORBInitInfo ; 31 32 38 public class CorbaClientSecurityInterceptor extends SecurityInterceptor implements ClientRequestInterceptor { 39 40 43 private String interceptorName = "CorbaClientSecurityInteceptor"; 44 45 48 public CorbaClientSecurityInterceptor(ORBInitInfo info) { 49 } 50 51 55 public String name() { 56 return interceptorName; 57 } 58 59 public void destroy() { 60 } 61 62 67 public void send_request(ClientRequestInfo jri) throws ForwardRequest { 68 SecurityCurrent current = SecurityCurrent.getCurrent(); 70 if (current != null) { 71 SecurityContext jsc = current.getSecurityContext(); 72 if (jsc != null) { 73 ServiceContext ssc = new ServiceContext (SEC_CTX_ID, marshallSecurityContext(jsc)); 74 jri.add_request_service_context(ssc, true); 75 } 76 } 77 78 } 79 80 85 public void receive_reply(ClientRequestInfo jri) { 86 } 87 88 public void send_poll(ClientRequestInfo jri) { 90 } 91 92 public void receive_exception(ClientRequestInfo jri) throws ForwardRequest { 93 } 94 95 public void receive_other(ClientRequestInfo jri) throws ForwardRequest { 96 } 97 } 98 99 | Popular Tags |