1 26 package org.objectweb.jonas.security.interceptors.jrmp; 27 28 import java.io.IOException ; 30 31 import org.objectweb.carol.rmi.jrmp.interceptor.JClientRequestInfo; 32 import org.objectweb.carol.rmi.jrmp.interceptor.JClientRequestInterceptor; 33 import org.objectweb.security.context.SecurityContext; 34 import org.objectweb.security.context.SecurityCurrent; 35 36 43 public class ClientSecurityInterceptor implements JClientRequestInterceptor { 44 45 48 public static int SEC_CTX_ID = 1; 49 50 53 private String interceptorName = "ClientSecurityInterceptor"; 54 55 58 public ClientSecurityInterceptor() { 59 } 60 61 68 public void send_request(JClientRequestInfo jri) throws IOException { 69 70 SecurityCurrent current = SecurityCurrent.getCurrent(); 72 if (current != null) { 73 SecurityContext ctx = current.getSecurityContext(); 75 SecurityServiceContext ssc = new SecurityServiceContext(SEC_CTX_ID, ctx); 76 jri.add_request_service_context(ssc); 77 } 78 } 79 80 86 public void receive_reply(JClientRequestInfo jri) throws IOException { 87 } 88 89 93 public String name() { 94 return interceptorName; 95 } 96 97 public void send_poll(JClientRequestInfo jri) throws IOException { 99 } 100 101 public void receive_exception(JClientRequestInfo jri) throws IOException { 102 } 103 104 public void receive_other(JClientRequestInfo jri) throws IOException { 105 } 106 } 107 108 | Popular Tags |