Search in sources :

Example 1 with LDAPEntry

use of edu.uiuc.ncsa.myproxy.oa4mp.oauth2.cm.ldap.LDAPEntry in project OA4MP by ncsa.

the class ClientManagerTest method testLDAPStore2.

/**
 * Retrieve a configuration by its client id.
 *
 * @param ldapStore
 * @param clientStore
 * @throws Exception
 */
public void testLDAPStore2(LDAPStore<LDAPEntry> ldapStore, ClientStore clientStore) throws Exception {
    OA2Client oa2Client = (OA2Client) clientStore.create();
    LDAPConfiguration ldap = createLDAP();
    LDAPEntry ldapEntry = ldapStore.create();
    ldapEntry.setClientID(oa2Client.getIdentifier());
    ldapEntry.setConfiguration(ldap);
    ldapStore.save(ldapEntry);
    LDAPEntry ldapEntry1 = ldapStore.getByClientID(ldapEntry.getClientID());
    assert ldapEntry.equals(ldapEntry1);
}
Also used : OA2Client(edu.uiuc.ncsa.security.oauth_2_0.OA2Client) LDAPEntry(edu.uiuc.ncsa.myproxy.oa4mp.oauth2.cm.ldap.LDAPEntry) LDAPConfiguration(edu.uiuc.ncsa.security.oauth_2_0.server.config.LDAPConfiguration)

Example 2 with LDAPEntry

use of edu.uiuc.ncsa.myproxy.oa4mp.oauth2.cm.ldap.LDAPEntry in project OA4MP by ncsa.

the class ClientManagerTest method testLDAPStore.

public void testLDAPStore(LDAPStore<LDAPEntry> ldapStore, ClientStore clientStore) throws Exception {
    OA2Client oa2Client = (OA2Client) clientStore.create();
    LDAPConfiguration ldap = createLDAP();
    LDAPEntry ldapEntry = ldapStore.create();
    ldapEntry.setClientID(oa2Client.getIdentifier());
    ldapEntry.setConfiguration(ldap);
    ldapStore.save(ldapEntry);
    LDAPEntry ldapEntry1 = ldapStore.get(ldapEntry.getIdentifier());
    assert ldapEntry.equals(ldapEntry1);
}
Also used : OA2Client(edu.uiuc.ncsa.security.oauth_2_0.OA2Client) LDAPEntry(edu.uiuc.ncsa.myproxy.oa4mp.oauth2.cm.ldap.LDAPEntry) LDAPConfiguration(edu.uiuc.ncsa.security.oauth_2_0.server.config.LDAPConfiguration)

Aggregations

LDAPEntry (edu.uiuc.ncsa.myproxy.oa4mp.oauth2.cm.ldap.LDAPEntry)2 OA2Client (edu.uiuc.ncsa.security.oauth_2_0.OA2Client)2 LDAPConfiguration (edu.uiuc.ncsa.security.oauth_2_0.server.config.LDAPConfiguration)2