X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=rap%2Forg.argeo.cms.ui.rap%2Fsrc%2Forg%2Fargeo%2Fcms%2Fweb%2FCmsWebEntryPoint.java;h=afc07c5b0681dfa61cfd057ed3ead7ad1ffcc25e;hb=b71546ddc74d6ca49d252806aafd491c75dfe1fb;hp=b0d1e842df7451fa03abbd87dbf57fb69e7543ca;hpb=4185ff8826f893a4a1f054f61a11b89333c3e85d;p=lgpl%2Fargeo-commons.git diff --git a/rap/org.argeo.cms.ui.rap/src/org/argeo/cms/web/CmsWebEntryPoint.java b/rap/org.argeo.cms.ui.rap/src/org/argeo/cms/web/CmsWebEntryPoint.java index b0d1e842d..afc07c5b0 100644 --- a/rap/org.argeo.cms.ui.rap/src/org/argeo/cms/web/CmsWebEntryPoint.java +++ b/rap/org.argeo.cms.ui.rap/src/org/argeo/cms/web/CmsWebEntryPoint.java @@ -12,14 +12,13 @@ import javax.security.auth.Subject; import javax.security.auth.login.LoginContext; import javax.security.auth.login.LoginException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.api.NodeConstants; import org.argeo.api.cms.CmsApp; +import org.argeo.api.cms.CmsAuth; import org.argeo.api.cms.CmsImageManager; import org.argeo.api.cms.CmsSession; import org.argeo.api.cms.CmsUi; import org.argeo.api.cms.CmsView; +import org.argeo.api.cms.CmsLog; import org.argeo.api.cms.UxContext; import org.argeo.cms.LocaleUtils; import org.argeo.cms.auth.CurrentUser; @@ -50,7 +49,7 @@ import org.osgi.service.event.EventAdmin; @SuppressWarnings("restriction") public class CmsWebEntryPoint implements EntryPoint, CmsView, BrowserNavigationListener { private static final long serialVersionUID = 7733510691684570402L; - private final static Log log = LogFactory.getLog(CmsWebEntryPoint.class); + private final static CmsLog log = CmsLog.getLog(CmsWebEntryPoint.class); private EventAdmin eventAdmin; @@ -85,13 +84,13 @@ public class CmsWebEntryPoint implements EntryPoint, CmsView, BrowserNavigationL // Initial login LoginContext lc; try { - lc = new LoginContext(NodeConstants.LOGIN_CONTEXT_USER, + lc = new LoginContext(CmsAuth.LOGIN_CONTEXT_USER, new RemoteAuthCallbackHandler(new ServletHttpRequest(UiContext.getHttpRequest()), new ServletHttpResponse(UiContext.getHttpResponse()))); lc.login(); } catch (LoginException e) { try { - lc = new LoginContext(NodeConstants.LOGIN_CONTEXT_ANONYMOUS); + lc = new LoginContext(CmsAuth.LOGIN_CONTEXT_ANONYMOUS); lc.login(); } catch (LoginException e1) { throw new IllegalStateException("Cannot log in as anonymous", e1); @@ -156,7 +155,7 @@ public class CmsWebEntryPoint implements EntryPoint, CmsView, BrowserNavigationL try { CurrentUser.logoutCmsSession(loginContext.getSubject()); loginContext.logout(); - LoginContext anonymousLc = new LoginContext(NodeConstants.LOGIN_CONTEXT_ANONYMOUS); + LoginContext anonymousLc = new LoginContext(CmsAuth.LOGIN_CONTEXT_ANONYMOUS); anonymousLc.login(); authChange(anonymousLc); } catch (LoginException e) {