}
Subject subject = SecurityActions.getAuthenticatedSubject();
Set<Principal> expectedRoles = rolesSet(roles);
if (!authorizationManager.doesUserHaveRole(null, expectedRoles)) {
SecurityContext sc = SecurityActions.getSecurityContext();
StringBuilder builder = new StringBuilder("Authorization Failed:Subject=");
builder.append(subject).append(":Expected Roles=").append(expectedRoles);
SecurityContextCallbackHandler scbh = new SecurityContextCallbackHandler(sc);
builder.append("::Actual Roles=").append(authorizationManager.getSubjectRoles(subject, scbh));