Examples of UsernamePasswordHandler


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

      lc.logout();
   }
   public void testLdapExample24() throws Exception
   {
      System.out.println("testLdapExample24");
      UsernamePasswordHandler handler = new UsernamePasswordHandler("Java Duke",
         "theduke".toCharArray());
      LoginContext lc = new LoginContext("testLdapExample24", handler);
      lc.login();

      Subject subject = lc.getSubject();
View Full Code Here

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

objectCategory: CN=Group,CN=Schema,CN=Configuration,DC=uz,DC=kuleuven,DC=ac,DC=be
    */
   public void testJBAS3312() throws Exception
   {
      System.out.println("testJBAS3312");
      UsernamePasswordHandler handler = new UsernamePasswordHandler("jduke",
         "theduke".toCharArray());
      LoginContext lc = new LoginContext("testJBAS3312", handler);
      lc.login();

      Subject subject = lc.getSubject();
View Full Code Here

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

        */
    }

    public void testLogin()
    {
        CallbackHandler handler = new UsernamePasswordHandler("scott", "stark".toCharArray());
        try
        {
            LoginContext lc = new LoginContext("srp-login", handler);
            lc.login();
            Subject subject = lc.getSubject();
View Full Code Here

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

         }
         else
         {
            username = principal.toString();
         }
         UsernamePasswordHandler handler = new UsernamePasswordHandler(username,
            credentials);
         // Do the JAAS login
         LoginContext lc = new LoginContext(protocol, handler);
         lc.login();
      }
View Full Code Here

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

         }
         else
         {
            username = principal.toString();
         }
         UsernamePasswordHandler handler = new UsernamePasswordHandler(username,
            credentials);
         // Do the JAAS login
         LoginContext lc = new LoginContext(protocol, handler);
         lc.login();
      }
View Full Code Here

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

        }
    }

    private void _checkAuthentication(String username, String password) throws LoginException {
        try {
            UsernamePasswordHandler handler = new UsernamePasswordHandler(username, password.toCharArray());
            LoginContext loginContext;
            loginContext = new LoginContext(CustomJaasDeploymentServiceMBean.RHQ_USER_SECURITY_DOMAIN, handler);

            loginContext.login();
            loginContext.getSubject().getPrincipals().iterator().next();
View Full Code Here

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

   }

   public void testSingleThreaded() throws Exception
   {
      System.out.println("+++ testSingleThreaded");
      UsernamePasswordHandler handler = new UsernamePasswordHandler("jduke",
         "theduke");
      LoginContext lc = new LoginContext("testSingleThreaded", handler);
      lc.login();
      Subject subject = lc.getSubject();
      System.out.println("LC.Subject: "+subject);
View Full Code Here

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

     
      Principal jduke1 = new SimplePrincipal("jduke1");
      SecurityAssociation.setPrincipal(jduke1);
      SecurityAssociation.setCredential("theduke1");

      UsernamePasswordHandler handler = new UsernamePasswordHandler("jduke2",
         "theduke2");
      LoginContext lc = new LoginContext("testSingleThreadedRestoreIdentity", handler);
      lc.login();
      Subject subject = lc.getSubject();
      System.out.println("LC.Subject: "+subject);
View Full Code Here

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

      Principal jduke2 = new SimplePrincipal("jduke2");
      Subject subject2 = new Subject();
      SecurityAssociation.pushSubjectContext(subject2, jduke2, "theduke2");

      UsernamePasswordHandler handler = new UsernamePasswordHandler("jduke3",
         "theduke3");
      LoginContext lc = new LoginContext("testSingleThreadedRestoreIdentity", handler);
      lc.login();
      Subject subject = lc.getSubject();
      System.out.println("LC.Subject: "+subject);
View Full Code Here

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

      public void run()
      {
         try
         {
            System.out.println("+++ testMultiThreadedRunnable");
            UsernamePasswordHandler handler = new UsernamePasswordHandler("jduke",
               "theduke");
            LoginContext lc = new LoginContext("testSingleThreaded", handler);
            lc.login();
            Subject subject = lc.getSubject();
            System.out.println("LC.Subject: "+subject);
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.