Examples of JBossCallbackHandler


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

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

   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.auth.callback.JBossCallbackHandler

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

Examples of org.mc4j.ems.impl.jmx.connection.support.providers.jaas.JBossCallbackHandler

    }

    private void initJaasLoginContext() throws LoginException {
        Configuration jaasConfig = new JBossConfiguration();
        Configuration.setConfiguration(jaasConfig);
        JBossCallbackHandler jaasCallbackHandler = new JBossCallbackHandler(
            this.connectionSettings.getPrincipal(), this.connectionSettings.getCredentials());
        this.loginContext = new LoginContext(JBossConfiguration.JBOSS_ENTRY_NAME, jaasCallbackHandler);
    }   
View Full Code Here

Examples of org.mc4j.ems.impl.jmx.connection.support.providers.jaas.JBossCallbackHandler

    }

    private void initJaasLoginContext() throws LoginException {
        Configuration jaasConfig = new JBossConfiguration();
        Configuration.setConfiguration(jaasConfig);
        JBossCallbackHandler jaasCallbackHandler = new JBossCallbackHandler(
            this.connectionSettings.getPrincipal(), this.connectionSettings.getCredentials());
        this.loginContext = new LoginContext(JBossConfiguration.JBOSS_ENTRY_NAME, jaasCallbackHandler);
    }   
View Full Code Here

Examples of org.mc4j.ems.impl.jmx.connection.support.providers.jaas.JBossCallbackHandler

    }

    private void initJaasLoginContext() throws LoginException {
        Configuration jaasConfig = new JBossConfiguration();
        Configuration.setConfiguration(jaasConfig);
        JBossCallbackHandler jaasCallbackHandler = new JBossCallbackHandler(
            this.connectionSettings.getPrincipal(), this.connectionSettings.getCredentials());
        this.loginContext = new LoginContext(JBossConfiguration.JBOSS_ENTRY_NAME, jaasCallbackHandler);
    }   
View Full Code Here

Examples of org.rhq.plugins.jbossas5.connection.jaas.JBossCallbackHandler

    private Object target;
    private LoginContext loginContext;

    public JaasAuthenticationInvocationHandler(Object target, String username, String password) {
        this.target = target;               
        JBossCallbackHandler jaasCallbackHandler = new JBossCallbackHandler(username, password);
        Configuration jaasConfig = new JBossConfiguration();
        try {
            this.loginContext = new LoginContext(JBossConfiguration.JBOSS_ENTRY_NAME, null, jaasCallbackHandler,
                    jaasConfig);
        }
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.