Package org.jboss.security.auth.callback

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


      validate(cbh);
   }
  
   public void testSerializability() throws Exception
   {
      JBossCallbackHandler cbh = new JBossCallbackHandler();
      cbh.setSecurityInfo(new SimplePrincipal("anil"), "testpass");
     
      // Serialize to a byte array
      ByteArrayOutputStream bos = new ByteArrayOutputStream() ;
      ObjectOutputStream out = new ObjectOutputStream(bos) ;
      out.writeObject(cbh);
      out.close();
    
      //Deserialize from a byte array
      JBossCallbackHandler otherCBH = null;
      ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()));
      otherCBH = (JBossCallbackHandler) in.readObject();
      in.close();
      assertNotNull("The deserialized cbh is not null:", otherCBH);
      validate(otherCBH);
View Full Code Here


   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

   /** Creates a default JaasSecurityManager for with a securityDomain
    name of 'other'.
    */
   public JaasSecurityManagerBase()
   {
      this("other", new JBossCallbackHandler());
   }
View Full Code Here

TOP

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

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.