Search in sources :

Example 21 with CasClient

use of org.pac4j.cas.client.CasClient in project cas by apereo.

the class DefaultDelegatedClientAuthenticationWebflowManager method store.

@Override
public TransientSessionTicket store(final JEEContext webContext, final Client client) throws Exception {
    val ticket = storeDelegatedClientAuthenticationRequest(webContext);
    rememberSelectedClientIfNecessary(webContext, client);
    if (client instanceof SAML2Client) {
        trackSessionIdForSAML2Client(webContext, ticket, (SAML2Client) client);
    }
    if (client instanceof OAuth20Client) {
        trackSessionIdForOAuth20Client(webContext, (OAuth20Client) client, ticket);
    }
    if (client instanceof OidcClient) {
        trackSessionIdForOidcClient(webContext, (OidcClient) client, ticket);
    }
    if (client instanceof CasClient) {
        trackSessionIdForCasClient(webContext, ticket, (CasClient) client);
    }
    if (client instanceof OAuth10Client) {
        trackSessionIdForOAuth10Client(webContext, ticket);
    }
    return ticket;
}
Also used : lombok.val(lombok.val) OAuth20Client(org.pac4j.oauth.client.OAuth20Client) OAuth10Client(org.pac4j.oauth.client.OAuth10Client) OidcClient(org.pac4j.oidc.client.OidcClient) SAML2Client(org.pac4j.saml.client.SAML2Client) CasClient(org.pac4j.cas.client.CasClient)

Aggregations

CasClient (org.pac4j.cas.client.CasClient)21 CasConfiguration (org.pac4j.cas.config.CasConfiguration)15 lombok.val (lombok.val)14 Test (org.junit.jupiter.api.Test)11 OidcClient (org.pac4j.oidc.client.OidcClient)6 SAML2Client (org.pac4j.saml.client.SAML2Client)6 JEEContext (org.pac4j.core.context.JEEContext)5 MockHttpServletRequest (org.springframework.mock.web.MockHttpServletRequest)5 MockHttpServletResponse (org.springframework.mock.web.MockHttpServletResponse)5 FacebookClient (org.pac4j.oauth.client.FacebookClient)4 TwitterClient (org.pac4j.oauth.client.TwitterClient)4 GoogleOidcClient (org.pac4j.oidc.client.GoogleOidcClient)4 Verb (com.github.scribejava.core.model.Verb)3 JWSAlgorithm (com.nimbusds.jose.JWSAlgorithm)3 Collection (java.util.Collection)3 LinkedHashSet (java.util.LinkedHashSet)3 Set (java.util.Set)3 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)3 StringUtils (org.apache.commons.lang3.StringUtils)3 CasConfigurationProperties (org.apereo.cas.configuration.CasConfigurationProperties)3