sm.getString("securityValve.missingMethod"));
return (false);
}
// Check each role included in this constraint
Realm realm = context.getRealm();
String roles[] = constraint.findAuthRoles();
if (roles == null)
roles = new String[0];
if (roles.length == 0)
return (true); // Authenticated user is sufficient
for (int i = 0; i < roles.length; i++) {
if (realm.hasRole(principal, roles[i]))
return (true);
}
// Return a "Forbidden" message denying access to this resource
response.getResponse().sendError