use of edu.uiuc.ncsa.myproxy.oa4mp.server.admin.things.actions.ActionRemove in project OA4MP by ncsa.
the class PermissionServerTest method removeClient.
public void removeClient(CMTestStoreProvider tp2) throws Exception {
CC cc = setupClients(tp2);
RemoveClientRequest req = RequestFactory.createRequest(cc.adminClient, new TypePermission(), new ActionRemove(), cc.client, null);
PermissionServer permissionServer = new PermissionServer(tp2.getCOSE());
PermissionResponse resp = (PermissionResponse) permissionServer.process(req);
assert tp2.getPermissionStore().get(cc.adminClient.getIdentifier(), cc.client.getIdentifier()).isEmpty();
}
use of edu.uiuc.ncsa.myproxy.oa4mp.server.admin.things.actions.ActionRemove in project OA4MP by ncsa.
the class AttributeServerTest method testAttributeServerRemove.
public void testAttributeServerRemove(CMTestStoreProvider tp2) throws Exception {
CC cc = setupClients(tp2);
AttributeServer attributeServer = new AttributeServer(tp2.getCOSE());
OA2ClientKeys keys = getClientKeys(tp2);
JSONArray attributes = new JSONArray();
attributes.add(keys.homeURL());
attributes.add(keys.email());
attributes.add(keys.rtLifetime());
attributes.add(keys.scopes());
AttributeRemoveRequest req = RequestFactory.createRequest(cc.adminClient, new TypeAttribute(), new ActionRemove(), cc.client, attributes);
AttributeClientResponse resp = (AttributeClientResponse) attributeServer.process(req);
OA2Client client = (OA2Client) resp.getClient();
assert client.getScopes() == null || client.getScopes().isEmpty();
assert client.getRtLifetime() == 0L;
assert client.getHomeUri() == null;
assert client.getEmail() == null;
}
Aggregations