Package org.apache.karaf.util.jaas
Class JaasHelper
- java.lang.Object
-
- org.apache.karaf.util.jaas.JaasHelper
-
public class JaasHelper extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJaasHelper.DelegatingProtectionDomainstatic classJaasHelper.OsgiSubjectDomainCombiner
-
Constructor Summary
Constructors Constructor Description JaasHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancurrentUserHasRole(String requestedRole)static booleancurrentUserHasRole(Set<Principal> principals, String requestedRole)static <T> TdoAs(Subject subject, PrivilegedAction<T> action)static <T> TdoAs(Subject subject, PrivilegedExceptionAction<T> action)static voidrunAs(Subject subject, Runnable action)
-
-
-
Method Detail
-
currentUserHasRole
public static boolean currentUserHasRole(String requestedRole)
-
currentUserHasRole
public static boolean currentUserHasRole(Set<Principal> principals, String requestedRole)
-
doAs
public static <T> T doAs(Subject subject, PrivilegedAction<T> action)
-
doAs
public static <T> T doAs(Subject subject, PrivilegedExceptionAction<T> action) throws PrivilegedActionException
- Throws:
PrivilegedActionException
-
-