use of org.pac4j.core.credentials.extractor.ParameterExtractor in project pac4j by pac4j.
the class ParameterClient method clientInit.
@Override
protected void clientInit() {
CommonHelper.assertNotBlank("parameterName", this.parameterName);
defaultCredentialsExtractor(new ParameterExtractor(this.parameterName, this.supportGetRequest, this.supportPostRequest));
}
use of org.pac4j.core.credentials.extractor.ParameterExtractor in project pac4j by pac4j.
the class DirectCasClient method clientInit.
@Override
protected void clientInit() {
CommonHelper.assertNotNull("urlResolver", this.urlResolver);
CommonHelper.assertNotNull("callbackUrlResolver", this.callbackUrlResolver);
CommonHelper.assertNotNull("configuration", this.configuration);
CommonHelper.assertTrue(!configuration.isGateway(), "the DirectCasClient can not support gateway to avoid infinite loops");
defaultCredentialsExtractor(new ParameterExtractor(CasConfiguration.TICKET_PARAMETER, true, false));
// only a fake one for the initialization as we will build a new one with the current url for each request
super.defaultAuthenticator(new CasAuthenticator(configuration, getName(), urlResolver, callbackUrlResolver, "fake"));
addAuthorizationGenerator(new DefaultCasAuthorizationGenerator<>());
}
use of org.pac4j.core.credentials.extractor.ParameterExtractor in project pac4j by pac4j.
the class DirectCasProxyClient method clientInit.
@Override
protected void clientInit() {
CommonHelper.assertNotNull("urlResolver", this.urlResolver);
CommonHelper.assertNotNull("callbackUrlResolver", this.callbackUrlResolver);
CommonHelper.assertNotBlank("serviceUrl", this.serviceUrl);
CommonHelper.assertNotNull("configuration", this.configuration);
// must be a CAS proxy protocol
final CasProtocol protocol = configuration.getProtocol();
CommonHelper.assertTrue(protocol == CasProtocol.CAS20_PROXY || protocol == CasProtocol.CAS30_PROXY, "The DirectCasProxyClient must be configured with a CAS proxy protocol (CAS20_PROXY or CAS30_PROXY)");
defaultCredentialsExtractor(new ParameterExtractor(CasConfiguration.TICKET_PARAMETER, true, false));
defaultAuthenticator(new CasAuthenticator(configuration, getName(), urlResolver, callbackUrlResolver, this.serviceUrl));
addAuthorizationGenerator(new DefaultCasAuthorizationGenerator<>());
}
Aggregations