X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms%2Fsrc%2Forg%2Fargeo%2Fcms%2Fauth%2FHttpSessionLoginModule.java;h=8cb524fbe344bd6b864a40b5bfd0f89555ba7a3a;hb=ecf8ab7382eadecab5a93261f261d0fd2168ffa8;hp=eb43ead247d13348ac027825c77a590d436b1fc2;hpb=0c4ab3f93c4ac614fc9dd13423142bb8394b1823;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.cms/src/org/argeo/cms/auth/HttpSessionLoginModule.java b/org.argeo.cms/src/org/argeo/cms/auth/HttpSessionLoginModule.java index eb43ead24..8cb524fbe 100644 --- a/org.argeo.cms/src/org/argeo/cms/auth/HttpSessionLoginModule.java +++ b/org.argeo.cms/src/org/argeo/cms/auth/HttpSessionLoginModule.java @@ -19,7 +19,6 @@ import javax.servlet.http.HttpSession; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.argeo.cms.CmsException; import org.argeo.cms.internal.kernel.Activator; import org.osgi.framework.BundleContext; import org.osgi.framework.FrameworkUtil; @@ -113,6 +112,7 @@ public class HttpSessionLoginModule implements LoginModule { } else { if (log.isTraceEnabled()) log.trace("HTTP login: " + true); + request.setAttribute(HttpContext.AUTHORIZATION, authorization); return true; } } @@ -181,10 +181,10 @@ public class HttpSessionLoginModule implements LoginModule { sharedState.put(CmsAuthUtils.SHARED_STATE_NAME, login); sharedState.put(CmsAuthUtils.SHARED_STATE_PWD, password); } else { - throw new CmsException("Invalid authentication token"); + throw new IllegalStateException("Invalid authentication token"); } } catch (Exception e) { - throw new CmsException("Couldn't retrieve authentication", e); + throw new IllegalStateException("Couldn't retrieve authentication", e); } } else if (basic.equalsIgnoreCase("Negotiate")) { String spnegoToken = st.nextToken();