Class RunAsRunner
- java.lang.Object
-
- com.evolveum.midpoint.model.impl.security.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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
runAs(CheckedCommonRunnable runnable, ObjectReferenceType identityRef, OperationResult parentResult)
-
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
runAs
public void runAs(CheckedCommonRunnable runnable, ObjectReferenceType identityRef, OperationResult parentResult) throws CommonException
- Throws:
CommonException
-
-