use of org.pac4j.oauth.client.WordPressClient in project cas by apereo.
the class Pac4jAuthenticationEventExecutionPlanConfiguration method configureWordpressClient.
private void configureWordpressClient(final Collection<BaseClient> properties) {
final Pac4jProperties.Wordpress wp = casProperties.getAuthn().getPac4j().getWordpress();
if (StringUtils.isNotBlank(wp.getId()) && StringUtils.isNotBlank(wp.getSecret())) {
final WordPressClient client = new WordPressClient(wp.getId(), wp.getSecret());
properties.add(client);
}
}
use of org.pac4j.oauth.client.WordPressClient in project cas by apereo.
the class DelegatedClientFactory method configureWordpressClient.
/**
* Configure wordpress client.
*
* @param properties the properties
*/
protected void configureWordpressClient(final Collection<BaseClient> properties) {
final Pac4jDelegatedAuthenticationProperties.Wordpress wp = pac4jProperties.getWordpress();
if (StringUtils.isNotBlank(wp.getId()) && StringUtils.isNotBlank(wp.getSecret())) {
final WordPressClient client = new WordPressClient(wp.getId(), wp.getSecret());
configureClient(client, wp);
LOGGER.debug("Created client [{}] with identifier [{}]", client.getName(), client.getKey());
properties.add(client);
}
}
use of org.pac4j.oauth.client.WordPressClient in project pac4j by pac4j.
the class RunWordPressClient method getClient.
@Override
protected IndirectClient getClient() {
final WordPressClient wordPressClient = new WordPressClient();
wordPressClient.setKey("209");
wordPressClient.setSecret("xJBXMRVvKrvHqyvM6BpzkenJVMIdQrIWKjPJsezjGYu71y7sDgt8ibz6s9IFLqU8");
wordPressClient.setCallbackUrl(PAC4J_URL);
return wordPressClient;
}
use of org.pac4j.oauth.client.WordPressClient in project cas by apereo.
the class DefaultDelegatedClientFactory method configureWordPressClient.
/**
* Configure wordpress client.
*
* @param properties the properties
*/
protected void configureWordPressClient(final Collection<IndirectClient> properties) {
val pac4jProperties = casProperties.getAuthn().getPac4j();
val wp = pac4jProperties.getWordpress();
if (wp.isEnabled() && StringUtils.isNotBlank(wp.getId()) && StringUtils.isNotBlank(wp.getSecret())) {
val client = new WordPressClient(wp.getId(), wp.getSecret());
configureClient(client, wp);
LOGGER.debug("Created client [{}] with identifier [{}]", client.getName(), client.getKey());
properties.add(client);
}
}
Aggregations