}
}
public CompositeData getAuthorization(String username) throws IOException {
try {
Role role = service.getRole(username);
if (role == null || role.getType() != Role.USER) {
throw new IllegalArgumentException(username + " is not User name");
}
Authorization authorization = service.getAuthorization((User) role);
Map<String, Object> values = new HashMap<String, Object>();
String name = authorization.getName();
values.put(NAME, name);
Role authRole = service.getRole(name);
values.put(TYPE, authRole.getType());
return new CompositeDataSupport(AUTORIZATION_TYPE, values);
} catch (IllegalArgumentException e) {
logVisitor.warning("getAuthorization error", e);
throw e;
} catch (Exception e) {