Examples of JASPIServerAuthenticationManager


Examples of org.jboss.security.plugins.auth.JASPIServerAuthenticationManager

        if (this.serverAuthenticationManagerClass ==  null) {
            SecurityContext context = SecurityActions.getSecurityContext();
            if (context != null) {
                WebLogger.WEB_SECURITY_LOGGER.debugf("Instantiating JASPI authentication manager with security domain %s",
                        context.getSecurityDomain());
                sam = new JASPIServerAuthenticationManager(context.getSecurityDomain(), new JBossCallbackHandler());
            }
            else {
                WebLogger.WEB_SECURITY_LOGGER.debugf("Security context is null, instantiating JASPI authentication manager with default domain");
                sam = new JASPIServerAuthenticationManager();
            }
        }
        // if not, load the configured authentication manager via reflection.
        else {
            Class<?> clazz;
View Full Code Here

Examples of org.jboss.security.plugins.auth.JASPIServerAuthenticationManager

   public void testIsValid()
   {
      CallbackHandler cbh = new AppCallbackHandler("anil",
            "anilpwd".toCharArray());
      MessageInfo messageInfo = new GenericMessageInfo(new Object(), new Object());
      JASPIServerAuthenticationManager jaspiManager = new JASPIServerAuthenticationManager();
      boolean valid = jaspiManager.isValid(messageInfo, new Subject(), layer,
                                       cbh);
      assertTrue(valid);
   }
View Full Code Here

Examples of org.jboss.security.plugins.auth.JASPIServerAuthenticationManager

   public void testIsInValid()
   {
      CallbackHandler cbh = new AppCallbackHandler("anil",
            "dead".toCharArray());
      MessageInfo messageInfo = new GenericMessageInfo(new Object(), new Object());
      JASPIServerAuthenticationManager jaspiManager = new JASPIServerAuthenticationManager();
      boolean valid = jaspiManager.isValid(messageInfo, new Subject(), layer,
                                       cbh);
      assertFalse(valid);
   }
View Full Code Here

Examples of org.jboss.security.plugins.auth.JASPIServerAuthenticationManager

   @Override
   public void testLogin() throws Exception
   {
      HttpServletRequest hsr = getHttpServletRequest("jduke", "theduke");
      MessageInfo mi = new GenericMessageInfo(hsr, (HttpServletResponse) null);
      ServerAuthenticationManager am = new JASPIServerAuthenticationManager(securityDomain, acbh);
      assertTrue(am.isValid(mi, (Subject)null, "HTTP", new JBossCallbackHandler()));
   }
View Full Code Here

Examples of org.jboss.security.plugins.auth.JASPIServerAuthenticationManager

   @Override
   public void testUnsuccessfulLogin() throws Exception
   {
      HttpServletRequest hsr = getHttpServletRequest("jduke", "BAD");
      MessageInfo mi = new GenericMessageInfo(hsr, (HttpServletResponse) null);
      ServerAuthenticationManager am = new JASPIServerAuthenticationManager(securityDomain, acbh);
      assertFalse(am.isValid(mi, (Subject)null, "HTTP", null));
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.