1 25 26 package org.objectweb.jonas.security.interceptors.jeremie; 27 28 import org.objectweb.security.propagation.SecurityReceiver; 29 import org.objectweb.security.context.SecurityCurrent; 30 import org.objectweb.security.context.SecurityContext; 31 32 36 public class JonasSecurityReceiver implements SecurityReceiver { 37 38 41 public JonasSecurityReceiver() { 42 } 43 44 public void received_request(int request_id, SecurityContext ctx) { 45 SecurityCurrent current = SecurityCurrent.getCurrent(); 47 if (current == null) { 48 return; 49 } 50 current.setSecurityContext(ctx); 52 } 53 54 public SecurityContext sending_reply(int request_id) { 55 SecurityCurrent current = SecurityCurrent.getCurrent(); 57 if (current == null) { 58 return null; 59 } 60 SecurityContext ctx = current.getSecurityContext(); 62 current.setSecurityContext(new SecurityContext()); 64 return ctx; 67 } 68 } | Popular Tags |