我将 cas-overlay-template 6.6.15 与 pac4j 5.4.6 一起使用,并且在实现 DeleatedClientAuthenticationHandler 类时遇到依赖问题。该类扩展了 AbstractPac4jAuthenticationHandler,我这样做是因为我依赖于以前的 cas 实现(v6.3.7.4)。
做时:
导入 org.pac4j.core.context.JEEContext;
导入 org.pac4j.core.context.session.SessionStore;
我收到导入无法解决的错误,但是 JEEContext 类存在并且 SessionStore 接口也存在
相关课程如下:
import org.apereo.cas.authentication.AuthenticationHandlerExecutionResult;
import org.apereo.cas.authentication.Credential;
import org.apereo.cas.authentication.PreventedException;
import org.apereo.cas.authentication.principal.PrincipalFactory;
import org.apereo.cas.authentication.principal.Service;
import org.apereo.cas.authentication.principal.provision.DelegatedClientUserProfileProvisioner;
import org.apereo.cas.integration.pac4j.authentication.handler.support.AbstractPac4jAuthenticationHandler;
import org.apereo.cas.services.ServicesManager;
import org.pac4j.core.client.Clients;
import org.pac4j.core.context.session.SessionStore;
import org.pac4j.core.context.JEEContext;
import org.pac4j.core.context.session.SessionStore;
public class DelegatedClientAuthenticationHandler extends AbstractPac4jAuthenticationHandler {
private final Clients clients;
private final DelegatedClientUserProfileProvisioner profileProvisioner;
private final SessionStore<JEEContext> sessionStore;
protected DelegatedClientAuthenticationHandler(String name, ServicesManager servicesManager,
PrincipalFactory principalFactory, Integer order, SessionStore sessionStore) {
super(name, servicesManager, principalFactory, order, sessionStore);
//TODO Auto-generated constructor stub
}
@Override
protected AuthenticationHandlerExecutionResult doAuthentication(Credential credential, Service service)
throws GeneralSecurityException, PreventedException {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'doAuthentication'");
}
}
也许在 6.6.15 版本中你必须扩展另一个类,或者你必须使用 JEEContext 以外的东西?
CAS 6.6.15 依赖于 pac4j v5.4.6。
它是来自
org.pac4j.jee.context.JEEContext
依赖项的 pac4j-javaee
,以及来自 org.pac4j.core.context.session.SessionStore
依赖项的 pac4j-core
。