use of edu.uiuc.ncsa.myproxy.oa4mp.oauth2.storage.OA2ClientMemoryStore in project OA4MP by ncsa.
the class ClientManagerTest method testOA2Client.
@Test
public void testOA2Client() throws Exception {
OA2ClientProvider clientProvider = new OA2ClientProvider(new OA4MPIdentifierProvider(OA4MPIdentifierProvider.CLIENT_ID));
OA2ClientMemoryStore store = new OA2ClientMemoryStore(clientProvider);
OA2ClientConverter converter = new OA2ClientConverter(clientProvider);
OA2Client c = getOa2Client(store);
JSONObject j = new JSONObject();
converter.toJSON(c, j);
System.out.println(j);
Client c2 = converter.fromJSON(j);
assert c2.equals(c);
}
Aggregations