SecurityIdentity securityIdentity = new SecurityIdentity();
securityIdentity.setRunAs(runAs.value());
bean.setSecurityIdentity(securityIdentity);
}
DeclareRoles declareRoles = clazz.getAnnotation(DeclareRoles.class);
if (declareRoles != null && bean instanceof RemoteBean){
RemoteBean remoteBean = (RemoteBean) bean;
List<SecurityRoleRef> securityRoleRefs = remoteBean.getSecurityRoleRef();
for (String role : declareRoles.value()) {
securityRoleRefs.add(new SecurityRoleRef(role));
}
}
Interceptors interceptors = clazz.getAnnotation(Interceptors.class);