use of org.pac4j.oauth.client.DropBoxClient in project cas by apereo.
the class DelegatedClientFactory method configureDropboxClient.
/**
* Configure dropbox client.
*
* @param properties the properties
*/
protected void configureDropboxClient(final Collection<BaseClient> properties) {
final Pac4jDelegatedAuthenticationProperties.Dropbox db = pac4jProperties.getDropbox();
if (StringUtils.isNotBlank(db.getId()) && StringUtils.isNotBlank(db.getSecret())) {
final DropBoxClient client = new DropBoxClient(db.getId(), db.getSecret());
configureClient(client, db);
LOGGER.debug("Created client [{}] with identifier [{}]", client.getName(), client.getKey());
properties.add(client);
}
}
use of org.pac4j.oauth.client.DropBoxClient in project cas by apereo.
the class DefaultDelegatedClientFactory method configureDropBoxClient.
/**
* Configure dropbox client.
*
* @param properties the properties
*/
protected void configureDropBoxClient(final Collection<IndirectClient> properties) {
val pac4jProperties = casProperties.getAuthn().getPac4j();
val db = pac4jProperties.getDropbox();
if (db.isEnabled() && StringUtils.isNotBlank(db.getId()) && StringUtils.isNotBlank(db.getSecret())) {
val client = new DropBoxClient(db.getId(), db.getSecret());
configureClient(client, db);
LOGGER.debug("Created client [{}] with identifier [{}]", client.getName(), client.getKey());
properties.add(client);
}
}
use of org.pac4j.oauth.client.DropBoxClient in project cas by apereo.
the class Pac4jAuthenticationEventExecutionPlanConfiguration method configureDropboxClient.
private void configureDropboxClient(final Collection<BaseClient> properties) {
final Pac4jProperties.Dropbox db = casProperties.getAuthn().getPac4j().getDropbox();
if (StringUtils.isNotBlank(db.getId()) && StringUtils.isNotBlank(db.getSecret())) {
final DropBoxClient client = new DropBoxClient(db.getId(), db.getSecret());
properties.add(client);
}
}
use of org.pac4j.oauth.client.DropBoxClient in project pac4j by pac4j.
the class RunDropboxClient method getClient.
@Override
protected IndirectClient getClient() {
final DropBoxClient dropBoxClient = new DropBoxClient();
dropBoxClient.setKey("0194c6m79qll0ia");
dropBoxClient.setSecret("a0ylze9a0bhsvxv");
dropBoxClient.setCallbackUrl("https://www.google.com");
return dropBoxClient;
}
Aggregations