本文整理了Java中org.wildfly.security.manager.WildFlySecurityManager.findAccessDenial()
方法的一些代码示例,展示了WildFlySecurityManager.findAccessDenial()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WildFlySecurityManager.findAccessDenial()
方法的具体详情如下:
包路径:org.wildfly.security.manager.WildFlySecurityManager
类名称:WildFlySecurityManager
方法名:findAccessDenial
[英]Find the protection domain in the given list which denies a permission, or null if the permission check would pass.
[中]在给定列表中查找拒绝权限的保护域,如果权限检查通过,则查找null。
代码示例来源:origin: wildfly/wildfly
/**
* Try a permission check. Any violations will be logged to the {@code org.wildfly.security.access} category
* at a {@code DEBUG} level.
*
* @param permission the permission to check
* @param domains the protection domains to try
* @return {@code true} if the access check succeeded, {@code false} otherwise
*/
public static boolean tryCheckPermission(final Permission permission, final ProtectionDomain... domains) {
if (permission.implies(SECURITY_MANAGER_PERMISSION)) {
return false;
}
final Context ctx = CTX.get();
if (ctx.checking) {
if (ctx.entered) {
return true;
}
ctx.entered = true;
try {
final ProtectionDomain deniedDomain = findAccessDenial(permission, domains);
if (deniedDomain != null) {
return false;
}
} finally {
ctx.entered = false;
}
}
return true;
}
代码示例来源:origin: wildfly/wildfly
stack = getProtectionDomainStack(context);
if (stack != null) {
final ProtectionDomain deniedDomain = findAccessDenial(perm, stack);
if (deniedDomain != null) {
throw access.accessControlException(perm, perm, deniedDomain.getCodeSource(), deniedDomain.getClassLoader());
代码示例来源:origin: org.wildfly.security/wildfly-elytron-security-manager
/**
* Try a permission check. Any violations will be logged to the {@code org.wildfly.security.access} category
* at a {@code DEBUG} level.
*
* @param permission the permission to check
* @param domains the protection domains to try
* @return {@code true} if the access check succeeded, {@code false} otherwise
*/
public static boolean tryCheckPermission(final Permission permission, final ProtectionDomain... domains) {
if (permission.implies(SECURITY_MANAGER_PERMISSION)) {
return false;
}
final Context ctx = CTX.get();
if (ctx.checking) {
if (ctx.entered) {
return true;
}
ctx.entered = true;
try {
final ProtectionDomain deniedDomain = findAccessDenial(permission, domains);
if (deniedDomain != null) {
return false;
}
} finally {
ctx.entered = false;
}
}
return true;
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
/**
* Try a permission check. Any violations will be logged to the {@code org.wildfly.security.access} category
* at a {@code DEBUG} level.
*
* @param permission the permission to check
* @param domains the protection domains to try
* @return {@code true} if the access check succeeded, {@code false} otherwise
*/
public static boolean tryCheckPermission(final Permission permission, final ProtectionDomain... domains) {
if (permission.implies(SECURITY_MANAGER_PERMISSION)) {
return false;
}
final Context ctx = CTX.get();
if (ctx.checking) {
if (ctx.entered) {
return true;
}
ctx.entered = true;
try {
final ProtectionDomain deniedDomain = findAccessDenial(permission, domains);
if (deniedDomain != null) {
return false;
}
} finally {
ctx.entered = false;
}
}
return true;
}
代码示例来源:origin: org.wildfly.security/wildfly-elytron
/**
* Try a permission check. Any violations will be logged to the {@code org.wildfly.security.access} category
* at a {@code DEBUG} level.
*
* @param permission the permission to check
* @param domains the protection domains to try
* @return {@code true} if the access check succeeded, {@code false} otherwise
*/
public static boolean tryCheckPermission(final Permission permission, final ProtectionDomain... domains) {
if (permission.implies(SECURITY_MANAGER_PERMISSION)) {
return false;
}
final Context ctx = CTX.get();
if (ctx.checking) {
if (ctx.entered) {
return true;
}
ctx.entered = true;
try {
final ProtectionDomain deniedDomain = findAccessDenial(permission, domains);
if (deniedDomain != null) {
return false;
}
} finally {
ctx.entered = false;
}
}
return true;
}
代码示例来源:origin: org.wildfly.security/wildfly-security-manager
final ProtectionDomain protectionDomain = findAccessDenial(permission, domains);
if (protectionDomain != null) {
final Context ctx = CTX.get();
代码示例来源:origin: org.wildfly.security/wildfly-elytron-security-manager
stack = getProtectionDomainStack(context);
if (stack != null) {
final ProtectionDomain deniedDomain = findAccessDenial(perm, stack);
if (deniedDomain != null) {
throw access.accessControlException(perm, perm, deniedDomain.getCodeSource(), deniedDomain.getClassLoader());
代码示例来源:origin: org.jboss.eap/wildfly-client-all
stack = getProtectionDomainStack(context);
if (stack != null) {
final ProtectionDomain deniedDomain = findAccessDenial(perm, stack);
if (deniedDomain != null) {
throw access.accessControlException(perm, perm, deniedDomain.getCodeSource(), deniedDomain.getClassLoader());
代码示例来源:origin: org.wildfly.security/wildfly-elytron
stack = getProtectionDomainStack(context);
if (stack != null) {
final ProtectionDomain deniedDomain = findAccessDenial(perm, stack);
if (deniedDomain != null) {
throw access.accessControlException(perm, perm, deniedDomain.getCodeSource(), deniedDomain.getClassLoader());
代码示例来源:origin: org.wildfly.security/wildfly-security-manager
stack = getProtectionDomainStack(context);
if (stack != null) {
final ProtectionDomain deniedDomain = findAccessDenial(perm, stack);
if (deniedDomain != null) {
final CodeSource codeSource = deniedDomain.getCodeSource();
内容来源于网络,如有侵权,请联系作者删除!