Search in sources :

Example 1 with ClientMemoryStore

use of edu.uiuc.ncsa.security.delegation.server.storage.impl.ClientMemoryStore in project OA4MP by ncsa.

the class ClientManagerTest method testClient.

@Test
public void testClient() throws Exception {
    ClientProvider clientProvider = new ClientProvider(new OA4MPIdentifierProvider(OA4MPIdentifierProvider.CLIENT_ID));
    ClientMemoryStore store = new ClientMemoryStore(clientProvider);
    ClientConverter converter = new ClientConverter(clientProvider);
    Client c = getClient(store);
    JSONObject j = new JSONObject();
    converter.toJSON(c, j);
    Client c2 = converter.fromJSON(j);
    assert c2.equals(c);
}
Also used : OA2ClientConverter(edu.uiuc.ncsa.security.oauth_2_0.OA2ClientConverter) ClientConverter(edu.uiuc.ncsa.security.delegation.storage.impl.ClientConverter) OA4MPIdentifierProvider(edu.uiuc.ncsa.myproxy.oa4mp.server.admin.transactions.OA4MPIdentifierProvider) JSONObject(net.sf.json.JSONObject) ClientProvider(edu.uiuc.ncsa.security.delegation.storage.ClientProvider) OA2ClientProvider(edu.uiuc.ncsa.security.oauth_2_0.OA2ClientProvider) Client(edu.uiuc.ncsa.security.delegation.storage.Client) OA2Client(edu.uiuc.ncsa.security.oauth_2_0.OA2Client) ClientMemoryStore(edu.uiuc.ncsa.security.delegation.server.storage.impl.ClientMemoryStore) OA2ClientMemoryStore(edu.uiuc.ncsa.myproxy.oa4mp.oauth2.storage.OA2ClientMemoryStore) Test(org.junit.Test)

Aggregations

OA2ClientMemoryStore (edu.uiuc.ncsa.myproxy.oa4mp.oauth2.storage.OA2ClientMemoryStore)1 OA4MPIdentifierProvider (edu.uiuc.ncsa.myproxy.oa4mp.server.admin.transactions.OA4MPIdentifierProvider)1 ClientMemoryStore (edu.uiuc.ncsa.security.delegation.server.storage.impl.ClientMemoryStore)1 Client (edu.uiuc.ncsa.security.delegation.storage.Client)1 ClientProvider (edu.uiuc.ncsa.security.delegation.storage.ClientProvider)1 ClientConverter (edu.uiuc.ncsa.security.delegation.storage.impl.ClientConverter)1 OA2Client (edu.uiuc.ncsa.security.oauth_2_0.OA2Client)1 OA2ClientConverter (edu.uiuc.ncsa.security.oauth_2_0.OA2ClientConverter)1 OA2ClientProvider (edu.uiuc.ncsa.security.oauth_2_0.OA2ClientProvider)1 JSONObject (net.sf.json.JSONObject)1 Test (org.junit.Test)1