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 voidcheckPermission(Permission permission) static voidcheckPermission(Supplier<Permission> supplier) static voiddoIfSecure(PrivilegedAction<?> action, Runnable fallback) static <T> TdoIfSecure(PrivilegedAction<T> action) static <T> TdoIfSecure(PrivilegedAction<T> action, Supplier<T> fallback) static <T> TdoIfSecure(PrivilegedExceptionAction<T> action) static <T> TdoPrivileged(PrivilegedAction<T> action) static <T> TdoPrivileged(PrivilegedExceptionAction<T> action) static CodeSourcestatic SubjectReturn 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
-