Search in sources :

Example 1 with WindowsLiveClient

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

the class Pac4jAuthenticationEventExecutionPlanConfiguration method configureWindowsLiveClient.

private void configureWindowsLiveClient(final Collection<BaseClient> properties) {
    final Pac4jProperties.WindowsLive live = casProperties.getAuthn().getPac4j().getWindowsLive();
    if (StringUtils.isNotBlank(live.getId()) && StringUtils.isNotBlank(live.getSecret())) {
        final WindowsLiveClient client = new WindowsLiveClient(live.getId(), live.getSecret());
        properties.add(client);
    }
}
Also used : WindowsLiveClient(org.pac4j.oauth.client.WindowsLiveClient) Pac4jProperties(org.apereo.cas.configuration.model.support.pac4j.Pac4jProperties)

Example 2 with WindowsLiveClient

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

the class DelegatedClientFactory method configureWindowsLiveClient.

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

Example 3 with WindowsLiveClient

use of org.pac4j.oauth.client.WindowsLiveClient in project pac4j by pac4j.

the class RunWindowsLiveClient method getClient.

@Override
protected IndirectClient getClient() {
    final WindowsLiveClient liveClient = new WindowsLiveClient();
    liveClient.setKey("00000000400BFE75");
    liveClient.setSecret("9yz0WtTIUQVV7HhBV2tccTziETOt4pRG");
    liveClient.setCallbackUrl(PAC4J_URL);
    return liveClient;
}
Also used : WindowsLiveClient(org.pac4j.oauth.client.WindowsLiveClient)

Example 4 with WindowsLiveClient

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

the class DefaultDelegatedClientFactory method configureWindowsLiveClient.

/**
 * Configure windows live client.
 *
 * @param properties the properties
 */
protected void configureWindowsLiveClient(final Collection<IndirectClient> properties) {
    val pac4jProperties = casProperties.getAuthn().getPac4j();
    val live = pac4jProperties.getWindowsLive();
    if (live.isEnabled() && StringUtils.isNotBlank(live.getId()) && StringUtils.isNotBlank(live.getSecret())) {
        val client = new WindowsLiveClient(live.getId(), live.getSecret());
        configureClient(client, live);
        LOGGER.debug("Created client [{}] with identifier [{}]", client.getName(), client.getKey());
        properties.add(client);
    }
}
Also used : lombok.val(lombok.val) WindowsLiveClient(org.pac4j.oauth.client.WindowsLiveClient)

Aggregations

WindowsLiveClient (org.pac4j.oauth.client.WindowsLiveClient)4 lombok.val (lombok.val)1 Pac4jDelegatedAuthenticationProperties (org.apereo.cas.configuration.model.support.pac4j.Pac4jDelegatedAuthenticationProperties)1 Pac4jProperties (org.apereo.cas.configuration.model.support.pac4j.Pac4jProperties)1