Package org.apache.accumulo.core.client.security.tokens

Examples of org.apache.accumulo.core.client.security.tokens.PasswordToken.destroy()


 
  @Test
  public void testConnectorWithDestroyedToken() throws DestroyFailedException, AccumuloException {
    PasswordToken token = new PasswordToken(password);
    assertFalse(token.isDestroyed());
    token.destroy();
    assertTrue(token.isDestroyed());
    try {
      getConnector().getInstance().getConnector("localUser", token);
      fail();
    } catch (AccumuloSecurityException e) {
View Full Code Here


  public void testDestroyTokenBeforeRPC() throws AccumuloException, DestroyFailedException, AccumuloSecurityException, TableNotFoundException {
    PasswordToken token = new PasswordToken(password);
    Connector userConnector = getConnector().getInstance().getConnector(username, token);
    Scanner scanner = userConnector.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
    assertFalse(token.isDestroyed());
    token.destroy();
    assertTrue(token.isDestroyed());
    try {
      Iterator<Entry<Key,Value>> iter = scanner.iterator();
      while (iter.hasNext())
        fail();
View Full Code Here

    Connector rootConnector = inst.getConnector("root", new PasswordToken());
    PasswordToken testToken = new PasswordToken("testPass");
    rootConnector.securityOperations().createLocalUser("testUser", testToken);
   
    assertFalse(testToken.isDestroyed());
    testToken.destroy();
    assertTrue(testToken.isDestroyed());
    try {
      inst.getConnector("testUser", testToken);
      fail();
    } catch (AccumuloSecurityException e) {
View Full Code Here

 
  @Test
  public void testConnectorWithDestroyedToken() throws DestroyFailedException, AccumuloException {
    PasswordToken token = new PasswordToken(password);
    assertFalse(token.isDestroyed());
    token.destroy();
    assertTrue(token.isDestroyed());
    try {
      getConnector().getInstance().getConnector("localUser", token);
      fail();
    } catch (AccumuloSecurityException e) {
View Full Code Here

  public void testDestroyTokenBeforeRPC() throws AccumuloException, DestroyFailedException, AccumuloSecurityException, TableNotFoundException {
    PasswordToken token = new PasswordToken(password);
    Connector userConnector = getConnector().getInstance().getConnector(username, token);
    Scanner scanner = userConnector.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
    assertFalse(token.isDestroyed());
    token.destroy();
    assertTrue(token.isDestroyed());
    try {
      Iterator<Entry<Key,Value>> iter = scanner.iterator();
      while (iter.hasNext())
        fail();
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.