1 22 package org.jboss.ejb3.security; 23 24 import java.util.Set ; 25 import java.util.HashSet ; 26 import java.util.Iterator ; 27 28 import java.security.Principal ; 29 30 import javax.annotation.security.RunAs; 31 import org.jboss.aop.joinpoint.Invocation; 32 import org.jboss.logging.Logger; 33 import org.jboss.security.AuthenticationManager; 34 import org.jboss.security.RealmMapping; 35 import org.jboss.security.RunAsIdentity; 36 import org.jboss.security.SecurityAssociation; 37 import org.jboss.security.SimplePrincipal; 38 39 45 public class RunAsSecurityInterceptor extends org.jboss.aspects.security.RunAsSecurityInterceptor 46 { 47 private static final Logger log = Logger.getLogger(RunAsSecurityInterceptor.class); 48 private RunAsIdentity runAsIdentity; 49 50 public RunAsSecurityInterceptor(AuthenticationManager manager, RealmMapping realmMapping, RunAsIdentity id) 51 { 52 super(manager, realmMapping); 53 this.runAsIdentity = id; 54 } 55 56 protected RunAsIdentity getRunAsIdentity(Invocation invocation) 57 { 58 return runAsIdentity; 59 } 60 61 public Object invoke(Invocation invocation) throws Throwable 62 { 63 return super.invoke(invocation); 64 } 65 66 } 67 | Popular Tags |