use of edu.uiuc.ncsa.myproxy.oa4mp.server.admin.adminClient.AdminClientKeys in project OA4MP by ncsa.
the class ResponseSerializer method serialize.
protected void serialize(AttributeGetAdminClientResponse response, HttpServletResponse servletResponse) throws IOException {
PrintWriter pw = servletResponse.getWriter();
JSONObject json = new JSONObject();
json.put("status", 0);
AdminClientKeys keys = (AdminClientKeys) cose.getAdminClientStore().getACConverter().getKeys();
List<String> allKeys = keys.allKeys();
allKeys.remove(keys.secret());
AdminClient newClient = (AdminClient) cose.getAdminClientStore().getACConverter().subset(response.getAdminClient(), response.getAttributes());
JSONObject jsonClient = new JSONObject();
cose.getAdminClientStore().getACConverter().toJSON(newClient, jsonClient);
json.put("content", jsonClient);
// return json;
pw.println(json);
}
use of edu.uiuc.ncsa.myproxy.oa4mp.server.admin.adminClient.AdminClientKeys in project OA4MP by ncsa.
the class ResponseSerializer method acToJSON.
private JSONObject acToJSON(AdminClient client) {
JSONObject json = new JSONObject();
json.put("status", 0);
AdminClientKeys keys = (AdminClientKeys) cose.getAdminClientStore().getACConverter().getKeys();
List<String> allKeys = keys.allKeys();
allKeys.remove(keys.secret());
AdminClient newClient = (AdminClient) cose.getAdminClientStore().getACConverter().subset(client, allKeys);
JSONObject jsonClient = new JSONObject();
cose.getAdminClientStore().getACConverter().toJSON(newClient, jsonClient);
json.put("content", jsonClient);
return json;
}
Aggregations