public class SecurityUtil
extends java.lang.Object
| Constructor and Description |
|---|
SecurityUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkSubjectHasPermission(javax.security.auth.Subject subject,
java.security.Permission perm)
Checks that a Subject has a Permission under the SecurityManager.
|
static void |
checkUserHasPermission(java.lang.String user,
java.security.Permission perm)
Checks that a User has a Permission under the SecurityManager.
|
static javax.security.auth.Subject |
createSystemPrincipalSubject(java.lang.String user)
Creates a (read-only) Subject representing a given user
as a System user within Derby.
|
private static java.lang.String |
getAuthorizationId(java.lang.String name)
Returns the Authorization Identifier for a principal name.
|
public static javax.security.auth.Subject createSystemPrincipalSubject(java.lang.String user)
user - the user nameprivate static java.lang.String getAuthorizationId(java.lang.String name)
name - the name of the principalpublic static void checkSubjectHasPermission(javax.security.auth.Subject subject,
java.security.Permission perm)
subject - the subject representing the SystemPrincipal(s)perm - the permission to be checkedjava.security.AccessControlException - if permissions are missingpublic static void checkUserHasPermission(java.lang.String user,
java.security.Permission perm)
user - the user to be check for having the permissionperm - the permission to be checkedjava.security.AccessControlException - if permissions are missingApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.