Package javax.security.auth.login

Examples of javax.security.auth.login.LoginContext.logout()


      assertTrue("Principals contains Roles", groups.contains(new SimplePrincipal("Roles")));
      Group roles = (Group) groups.iterator().next();
      assertTrue("Echo is a role", roles.isMember(new SimplePrincipal("Echo")));
      assertTrue("TheDuke is a role", roles.isMember(new SimplePrincipal("TheDuke")));

      lc.logout();
   }
   public void testLdapExample22() throws Exception
   {
      System.out.println("testLdapExample22");
      UsernamePasswordHandler handler = new UsernamePasswordHandler("jduke",
View Full Code Here


      assertTrue("Principals contains Roles", groups.contains(new SimplePrincipal("Roles")));
      Group roles = (Group) groups.iterator().next();
      assertTrue("Echo is a role", roles.isMember(new SimplePrincipal("Echo")));
      assertTrue("TheDuke is a role", roles.isMember(new SimplePrincipal("TheDuke")));

      lc.logout();
   }
   public void testLdapExample24() throws Exception
   {
      System.out.println("testLdapExample24");
      UsernamePasswordHandler handler = new UsernamePasswordHandler("Java Duke",
View Full Code Here

      assertTrue("R2 is a role", roles.isMember(new SimplePrincipal("R2")));
      assertTrue("R3 is a role", roles.isMember(new SimplePrincipal("R3")));
      assertFalse("R4 is NOT a role", roles.isMember(new SimplePrincipal("R4")));
      assertTrue("R5 is a role", roles.isMember(new SimplePrincipal("R5")));

      lc.logout();
   }

   /* JBAS-3312 testcase
dn: DC=uz,DC=kuleuven,DC=ac,DC=be
objectClass: top
View Full Code Here

      }
      assertTrue("inf_map_vmware_iso_S is a role", roles.isMember(new SimplePrincipal("inf_map_vmware_iso_S")));
      assertTrue("inf_map_informatiesystemen_lijst is a role", roles.isMember(new SimplePrincipal("inf_map_informatiesystemen_lijst")));
      assertTrue("inf_map_vmware_Lijst is a role", roles.isMember(new SimplePrincipal("inf_map_vmware_Lijst")));

      lc.logout();
   }

   public static void main(java.lang.String[] args)
   {
      System.setErr(System.out);
View Full Code Here

                    // Ignore
                }
            }
            if (lc != null) {
                try {
                    lc.logout();
                } catch (LoginException e) {
                    // Ignore
                }
            }
        }
View Full Code Here

    try {
      LOG.info("Initiating logout for " + getUserName());
      //clear up the kerberos state. But the tokens are not cleared! As per
      //the Java kerberos login module code, only the kerberos credentials
      //are cleared
      login.logout();
      //login and also update the subject field of this instance to
      //have the new credentials (pass it to the LoginContext constructor)
      login =
        newLoginContext(HadoopConfiguration.USER_KERBEROS_CONFIG_NAME,
            getSubject());
View Full Code Here

      LOG.info("Initiating logout for " + getUserName());
      synchronized (UserGroupInformation.class) {
        //clear up the kerberos state. But the tokens are not cleared! As per
        //the Java kerberos login module code, only the kerberos credentials
        //are cleared
        login.logout();
        //login and also update the subject field of this instance to
        //have the new credentials (pass it to the LoginContext constructor)
        login =
          newLoginContext(HadoopConfiguration.KEYTAB_KERBEROS_CONFIG_NAME,
                           getSubject());
View Full Code Here

                .println(String.format("* * About to perform test as %s * *\n\n", user == null ? "ConnectionUser" : user));

            makeCalls(secured, intermediate);
        } finally {
            if (loginContext != null) {
                loginContext.logout();
            }
            System.out.println("* * Test Complete * * \n\n");
            System.out.println("-------------------------------------------------");
        }
    }
View Full Code Here

                            shell.exec(finalUrl);
                            return null;
                        }
                    });
                } finally {
                    lc.logout();
                }
            } catch (LoginException ex) {
                ex.printStackTrace();
            }
        } else {
View Full Code Here

    try {
      LOG.info("Initiating logout for " + getUserName());
      //clear up the kerberos state. But the tokens are not cleared! As per
      //the Java kerberos login module code, only the kerberos credentials
      //are cleared
      login.logout();
      //login and also update the subject field of this instance to
      //have the new credentials (pass it to the LoginContext constructor)
      login =
        new LoginContext(HadoopConfiguration.USER_KERBEROS_CONFIG_NAME,
            getSubject());
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.