X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms%2Fsrc%2Forg%2Fargeo%2Fcms%2Fauth%2FIdentLoginModule.java;h=097e588e43737e83f09e6633a5309dcc8bdf25c4;hb=e023e9027edc0d734d11cb759259eaebb6d68bc9;hp=f5e4085c32a97e456822e60877c99f8ef121b473;hpb=7064547ae5d85225546f1b8f15d6b5c82f30fe22;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.cms/src/org/argeo/cms/auth/IdentLoginModule.java b/org.argeo.cms/src/org/argeo/cms/auth/IdentLoginModule.java index f5e4085c3..097e588e4 100644 --- a/org.argeo.cms/src/org/argeo/cms/auth/IdentLoginModule.java +++ b/org.argeo.cms/src/org/argeo/cms/auth/IdentLoginModule.java @@ -10,14 +10,13 @@ import javax.security.auth.callback.UnsupportedCallbackException; import javax.security.auth.login.LoginException; import javax.security.auth.spi.LoginModule; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.cms.internal.kernel.Activator; -import org.argeo.ident.IdentClient; +import org.argeo.api.cms.CmsLog; +import org.argeo.cms.auth.ident.IdentClient; +import org.argeo.cms.internal.runtime.CmsStateImpl; /** Use an ident service to identify. */ public class IdentLoginModule implements LoginModule { - private final static Log log = LogFactory.getLog(IdentLoginModule.class); + private final static CmsLog log = CmsLog.getLog(IdentLoginModule.class); private CallbackHandler callbackHandler = null; private Map sharedState = null; @@ -34,7 +33,7 @@ public class IdentLoginModule implements LoginModule { public boolean login() throws LoginException { if (callbackHandler == null) return false; - HttpRequestCallback httpCallback = new HttpRequestCallback(); + RemoteAuthCallback httpCallback = new RemoteAuthCallback(); try { callbackHandler.handle(new Callback[] { httpCallback }); } catch (IOException e) { @@ -42,10 +41,10 @@ public class IdentLoginModule implements LoginModule { } catch (UnsupportedCallbackException e) { return false; } - HttpRequest request = httpCallback.getRequest(); + RemoteAuthRequest request = httpCallback.getRequest(); if (request == null) return false; - IdentClient identClient = Activator.getIdentClient(request.getRemoteAddr()); + IdentClient identClient = CmsStateImpl.getIdentClient(request.getRemoteAddr()); if (identClient == null) return false; String identUsername;