[jboss-cvs] JBossAS SVN: r73921 - projects/security/security-jboss-sx/trunk/jbosssx/src/tests/org/jboss/test/authentication.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jun 2 09:29:25 EDT 2008
Author: anil.saldhana at jboss.com
Date: 2008-06-02 09:29:25 -0400 (Mon, 02 Jun 2008)
New Revision: 73921
Modified:
projects/security/security-jboss-sx/trunk/jbosssx/src/tests/org/jboss/test/authentication/WebJASPIAuthMgrUnitTestCase.java
Log:
add handler
Modified: projects/security/security-jboss-sx/trunk/jbosssx/src/tests/org/jboss/test/authentication/WebJASPIAuthMgrUnitTestCase.java
===================================================================
--- projects/security/security-jboss-sx/trunk/jbosssx/src/tests/org/jboss/test/authentication/WebJASPIAuthMgrUnitTestCase.java 2008-06-02 13:28:43 UTC (rev 73920)
+++ projects/security/security-jboss-sx/trunk/jbosssx/src/tests/org/jboss/test/authentication/WebJASPIAuthMgrUnitTestCase.java 2008-06-02 13:29:25 UTC (rev 73921)
@@ -23,18 +23,20 @@
import java.net.URL;
+import javax.security.auth.Subject;
import javax.security.auth.message.MessageInfo;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.jboss.security.AuthenticationManager;
import org.jboss.security.SecurityContextAssociation;
+import org.jboss.security.ServerAuthenticationManager;
import org.jboss.security.SimplePrincipal;
import org.jboss.security.auth.callback.AppCallbackHandler;
+import org.jboss.security.auth.callback.SecurityAssociationHandler;
import org.jboss.security.auth.login.XMLLoginConfigImpl;
import org.jboss.security.auth.message.GenericMessageInfo;
-import org.jboss.security.plugins.JBossAuthenticationManager;
import org.jboss.security.plugins.JBossSecurityContext;
+import org.jboss.security.plugins.auth.JASPIServerAuthenticationManager;
import org.jboss.test.SecurityActions;
import org.jboss.test.util.TestHttpServletRequest;
@@ -65,8 +67,8 @@
{
HttpServletRequest hsr = getHttpServletRequest("jduke", "theduke");
MessageInfo mi = new GenericMessageInfo(hsr, (HttpServletResponse) null);
- AuthenticationManager am = new JBossAuthenticationManager(securityDomain, acbh);
- assertTrue(am.isValid(mi, null, "HTTP"));
+ ServerAuthenticationManager am = new JASPIServerAuthenticationManager(securityDomain, acbh);
+ assertTrue(am.isValid(mi, (Subject)null, "HTTP", new SecurityAssociationHandler()));
}
@Override
@@ -74,8 +76,8 @@
{
HttpServletRequest hsr = getHttpServletRequest("jduke", "BAD");
MessageInfo mi = new GenericMessageInfo(hsr, (HttpServletResponse) null);
- AuthenticationManager am = new JBossAuthenticationManager(securityDomain, acbh);
- assertFalse(am.isValid(mi, null, "HTTP"));
+ ServerAuthenticationManager am = new JASPIServerAuthenticationManager(securityDomain, acbh);
+ assertFalse(am.isValid(mi, (Subject)null, "HTTP", null));
}
private void establishSecurityConfiguration()
More information about the jboss-cvs-commits
mailing list