public static void pushRunAsIdentity ( final RunAsIdentity principal ) { AccessController . doPrivileged ( new PrivilegedAction < Void > ( ) { @ Override public Void run ( ) { SecurityContext sc = getSecurityContext ( ) ; if ( sc == null ) throw MESSAGES . noSecurityContext ( ) ; sc . setOutgoingRunAs ( principal ) ; return null ; } } ) ; }
Sets the run as identity