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;
@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 {
@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);
}
}