Class SecurityUtils
java.lang.Object
org.eclipse.jetty.util.security.SecurityUtils
- 
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TRuns the action as the specified subject.static voidcheckPermission(Permission permission) Checks the given permission, if thesecurity manageris set.static <T> TDeprecated, for removal: This API element is subject to removal in a future version.static <T> TdoPrivileged(PrivilegedAction<T> action) Runs the given action with the calling context restricted to just the calling frame, not all the frames in the stack.static ObjectGet the current security manager, if available. 
- 
Method Details
- 
getSecurityManager
Get the current security manager, if available.- Returns:
 - the current security manager, if available
 
 - 
checkPermission
Checks the given permission, if the
security manageris set.- Parameters:
 permission- the permission to check- Throws:
 SecurityException- if the permission check fails
 - 
doPrivileged
Runs the given action with the calling context restricted to just the calling frame, not all the frames in the stack.
- Type Parameters:
 T- the type of the result- Parameters:
 action- the action to run- Returns:
 - the result of running the action
 
 - 
doAs
@Deprecated(forRemoval=true, since="12.1.0") public static <T> T doAs(Subject subject, Callable<T> action) Deprecated, for removal: This API element is subject to removal in a future version.Runs the action as the given subject.
- Type Parameters:
 T- the type of the result- Parameters:
 subject- the subject this action runs asaction- the action to run- Returns:
 - the result of the action
 
 - 
callAs
 
 - 
 
callAs(Subject, Callable)