Package com.tangosol.net.security
Class SecurityHelper
java.lang.Object
com.tangosol.net.security.SecurityHelper
A collection of security-related utilities.
- Author:
- dag 2009.11.16
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkPermission
(Permission permission) static void
checkPermission
(Supplier<Permission> supplier) static void
doIfSecure
(PrivilegedAction<?> action, Runnable fallback) static <T> T
doIfSecure
(PrivilegedAction<T> action) static <T> T
doIfSecure
(PrivilegedAction<T> action, Supplier<T> fallback) static <T> T
doIfSecure
(PrivilegedExceptionAction<T> action) static <T> T
doPrivileged
(PrivilegedAction<T> action) static <T> T
doPrivileged
(PrivilegedExceptionAction<T> action) static CodeSource
static Subject
Return the Subject from the current security context.static boolean
-
Field Details
-
EMPTY_SUBJECT
A subject that represents nobody.
-
-
Constructor Details
-
SecurityHelper
public SecurityHelper()
-
-
Method Details
-
getCurrentSubject
Return the Subject from the current security context.- Returns:
- the current Subject.
-
hasSecurityManager
public static boolean hasSecurityManager() -
doIfSecure
-
doIfSecure
- Throws:
Exception
-
doIfSecure
-
doIfSecure
-
doPrivileged
-
doPrivileged
public static <T> T doPrivileged(PrivilegedExceptionAction<T> action) throws PrivilegedActionException - Throws:
PrivilegedActionException
-
checkPermission
-
checkPermission
-
getCodeSource
-