Search in sources :

Example 1 with OrcidClient

use of org.pac4j.oauth.client.OrcidClient in project cas by apereo.

the class DelegatedClientFactory method configureOrcidClient.

/**
 * Configure orcid client.
 *
 * @param properties the properties
 */
protected void configureOrcidClient(final Collection<BaseClient> properties) {
    final Pac4jDelegatedAuthenticationProperties.Orcid db = pac4jProperties.getOrcid();
    if (StringUtils.isNotBlank(db.getId()) && StringUtils.isNotBlank(db.getSecret())) {
        final OrcidClient client = new OrcidClient(db.getId(), db.getSecret());
        configureClient(client, db);
        LOGGER.debug("Created client [{}] with identifier [{}]", client.getName(), client.getKey());
        properties.add(client);
    }
}
Also used : OrcidClient(org.pac4j.oauth.client.OrcidClient) Pac4jDelegatedAuthenticationProperties(org.apereo.cas.configuration.model.support.pac4j.Pac4jDelegatedAuthenticationProperties)

Aggregations

Pac4jDelegatedAuthenticationProperties (org.apereo.cas.configuration.model.support.pac4j.Pac4jDelegatedAuthenticationProperties)1 OrcidClient (org.pac4j.oauth.client.OrcidClient)1