Package org.jboss.security.auth.callback

Examples of org.jboss.security.auth.callback.AppCallbackHandler


   }
  
   public void testLogin() throws Exception
   {
      Principal p = new SimplePrincipal("jduke");
      AppCallbackHandler acbh = new AppCallbackHandler("jduke","theduke".toCharArray());
      AuthenticationManager am = new JBossAuthenticationManager("test",acbh);
      assertTrue(am.isValid(p, "theduke"));
  
View Full Code Here


  
  
   public void testUnsuccessfulLogin() throws Exception
   {
      Principal p = new SimplePrincipal("jduke");
      AppCallbackHandler acbh = new AppCallbackHandler("jduke","bad".toCharArray());
      AuthenticationManager am = new JBossAuthenticationManager("test",acbh);
      assertFalse(am.isValid(p, "bad"));
   }
View Full Code Here

   }
    
   private AuthorizationContext getTestAuthorizationContext(String name,Subject subject)
   {
      JBossAuthorizationContext jac = new JBossAuthorizationContext(name,subject,
            new AppCallbackHandler("anil", "anilpass".toCharArray()));
      jac.setApplicationPolicy(getTestApplicationPolicy());
      return jac;
   }
View Full Code Here

TOP

Related Classes of org.jboss.security.auth.callback.AppCallbackHandler

Copyright © 2018 www.massapicom. 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.