Class RunAsRunner

  • All Implemented Interfaces:
    AutoCloseable

    @Experimental
    public class RunAsRunner
    extends Object
    implements AutoCloseable
    Takes care of optimized "run as" operations. By optimization we mean that if the currently logged-in user is the same as the one specified in runAs, no login procedure is carried out. BEWARE: In order to return the original security context, the close() method must be called. This object is therefore to be used in try-with-resources context ONLY.