use of org.pac4j.oauth.client.FoursquareClient in project cas by apereo.
the class Pac4jAuthenticationEventExecutionPlanConfiguration method configureFoursquareClient.
private void configureFoursquareClient(final Collection<BaseClient> properties) {
final Pac4jProperties.Foursquare foursquare = casProperties.getAuthn().getPac4j().getFoursquare();
if (StringUtils.isNotBlank(foursquare.getId()) && StringUtils.isNotBlank(foursquare.getSecret())) {
final FoursquareClient client = new FoursquareClient(foursquare.getId(), foursquare.getSecret());
properties.add(client);
}
}
use of org.pac4j.oauth.client.FoursquareClient in project pac4j by pac4j.
the class RunFoursquareClient method getClient.
@Override
protected IndirectClient getClient() {
final FoursquareClient foursquareClient = new FoursquareClient();
foursquareClient.setKey("CONTW2V0SBAHTMXMUA2G1I2P55WGRVJLGBLNY2CFSG1JV4DQ");
foursquareClient.setSecret("EVAZNDHEQODSIPOKC13JAAPMR3IJRSMLE55TYUW3VYRY3VTC");
foursquareClient.setCallbackUrl(PAC4J_BASE_URL);
return foursquareClient;
}
use of org.pac4j.oauth.client.FoursquareClient in project cas by apereo.
the class DefaultDelegatedClientFactory method configureFoursquareClient.
/**
* Configure foursquare client.
*
* @param properties the properties
*/
protected void configureFoursquareClient(final Collection<IndirectClient> properties) {
val pac4jProperties = casProperties.getAuthn().getPac4j();
val foursquare = pac4jProperties.getFoursquare();
if (foursquare.isEnabled() && StringUtils.isNotBlank(foursquare.getId()) && StringUtils.isNotBlank(foursquare.getSecret())) {
val client = new FoursquareClient(foursquare.getId(), foursquare.getSecret());
configureClient(client, foursquare);
LOGGER.debug("Created client [{}] with identifier [{}]", client.getName(), client.getKey());
properties.add(client);
}
}
use of org.pac4j.oauth.client.FoursquareClient in project cas by apereo.
the class DelegatedClientFactory method configureFoursquareClient.
/**
* Configure foursquare client.
*
* @param properties the properties
*/
protected void configureFoursquareClient(final Collection<BaseClient> properties) {
final Pac4jDelegatedAuthenticationProperties.Foursquare foursquare = pac4jProperties.getFoursquare();
if (StringUtils.isNotBlank(foursquare.getId()) && StringUtils.isNotBlank(foursquare.getSecret())) {
final FoursquareClient client = new FoursquareClient(foursquare.getId(), foursquare.getSecret());
configureClient(client, foursquare);
LOGGER.debug("Created client [{}] with identifier [{}]", client.getName(), client.getKey());
properties.add(client);
}
}
Aggregations