X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms.e4.rap%2Fsrc%2Forg%2Fargeo%2Fcms%2Fe4%2Frap%2FCmsLoginLifecycle.java;h=12ee3c55e9150fe17ea22a87bd85eb13e3dd9156;hb=66dd22be4e93fec2554c65710ec5846a2f598c02;hp=300c7566b4efcd9f348e2950f9f4160aad23d8bc;hpb=ccec981c64963bbe27bd66fc466f237fd30b5971;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.cms.e4.rap/src/org/argeo/cms/e4/rap/CmsLoginLifecycle.java b/org.argeo.cms.e4.rap/src/org/argeo/cms/e4/rap/CmsLoginLifecycle.java index 300c7566b..12ee3c55e 100644 --- a/org.argeo.cms.e4.rap/src/org/argeo/cms/e4/rap/CmsLoginLifecycle.java +++ b/org.argeo.cms.e4.rap/src/org/argeo/cms/e4/rap/CmsLoginLifecycle.java @@ -10,7 +10,6 @@ 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.cms.CmsException; import org.argeo.cms.auth.CurrentUser; import org.argeo.cms.ui.CmsImageManager; import org.argeo.cms.ui.CmsView; @@ -114,7 +113,7 @@ public class CmsLoginLifecycle implements CmsView { @Override public void authChange(LoginContext loginContext) { if (loginContext == null) - throw new CmsException("Login context cannot be null"); + throw new IllegalArgumentException("Login context cannot be null"); // logout previous login context // if (this.loginContext != null) // try { @@ -128,12 +127,12 @@ public class CmsLoginLifecycle implements CmsView { @Override public void logout() { if (loginContext == null) - throw new CmsException("Login context should not be null"); + throw new IllegalStateException("Login context should not be null"); try { CurrentUser.logoutCmsSession(loginContext.getSubject()); loginContext.logout(); } catch (LoginException e) { - throw new CmsException("Cannot log out", e); + throw new IllegalStateException("Cannot log out", e); } }