Examples of cancelToken()


Examples of org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenSecretManager.cancelToken()

        .getNamesystem().getDelegationTokenSecretManager();
    Token<DelegationTokenIdentifier> token = generateDelegationToken(
        "SomeUser", "JobTracker");
    //Fake renewer should not be able to renew
    try {
      dtSecretManager.cancelToken(token, "FakeCanceller");
      Assert.fail("should have failed");
    } catch (AccessControlException ace) {
      // PASS
    }
    dtSecretManager.cancelToken(token, "JobTracker");
View Full Code Here

Examples of org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenSecretManager.cancelToken()

      dtSecretManager.cancelToken(token, "FakeCanceller");
      Assert.fail("should have failed");
    } catch (AccessControlException ace) {
      // PASS
    }
    dtSecretManager.cancelToken(token, "JobTracker");
    try {
      dtSecretManager.renewToken(token, "JobTracker");
      Assert.fail("should have failed");
    } catch (InvalidToken it) {
      // PASS
View Full Code Here

Examples of org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenSecretManager.cancelToken()

        .getDelegationTokenSecretManager();
    Token<DelegationTokenIdentifier> token = generateDelegationToken(
        "SomeUser", "JobTracker");
    //Fake renewer should not be able to renew
    try {
      dtSecretManager.cancelToken(token, "FakeCanceller");
      Assert.fail("should have failed");
    } catch (AccessControlException ace) {
      // PASS
    }
    dtSecretManager.cancelToken(token, "JobTracker");
View Full Code Here

Examples of org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenSecretManager.cancelToken()

      dtSecretManager.cancelToken(token, "FakeCanceller");
      Assert.fail("should have failed");
    } catch (AccessControlException ace) {
      // PASS
    }
    dtSecretManager.cancelToken(token, "JobTracker");
    try {
      dtSecretManager.renewToken(token, "JobTracker");
      Assert.fail("should have failed");
    } catch (InvalidToken it) {
      // PASS
View Full Code Here

Examples of org.apache.hadoop.lib.service.DelegationTokenManager.cancelToken()

    DelegationTokenManager tm = server.get(DelegationTokenManager.class);
    Token token = tm.createToken(UserGroupInformation.getCurrentUser(), "foo");
    Assert.assertNotNull(token);
    tm.verifyToken(token);
    Assert.assertTrue(tm.renewToken(token, "foo") > System.currentTimeMillis());
    tm.cancelToken(token, "foo");
    try {
      tm.verifyToken(token);
      Assert.fail();
    } catch (DelegationTokenManagerException ex) {
      //NOP
View Full Code Here

Examples of org.apache.hadoop.lib.service.DelegationTokenManager.cancelToken()

                } else {
                  if (dtOp == DelegationTokenOperation.CANCELDELEGATIONTOKEN) {
                    Token<DelegationTokenIdentifier> dt =
                      new Token<DelegationTokenIdentifier>();
                    dt.decodeFromUrlString(tokenParam);
                    tokenManager.cancelToken(dt,
                      UserGroupInformation.getCurrentUser().getUserName());
                  } else {
                    Token<DelegationTokenIdentifier> dt =
                      new Token<DelegationTokenIdentifier>();
                    dt.decodeFromUrlString(tokenParam);
View Full Code Here

Examples of org.apache.hadoop.lib.service.DelegationTokenManager.cancelToken()

    DelegationTokenManager tm = server.get(DelegationTokenManager.class);
    Token token = tm.createToken(UserGroupInformation.getCurrentUser(), "foo");
    Assert.assertNotNull(token);
    tm.verifyToken(token);
    Assert.assertTrue(tm.renewToken(token, "foo") > System.currentTimeMillis());
    tm.cancelToken(token, "foo");
    try {
      tm.verifyToken(token);
      Assert.fail();
    } catch (DelegationTokenManagerException ex) {
      //NOP
View Full Code Here

Examples of org.picketlink.identity.federation.core.interfaces.SecurityTokenProvider.cancelToken()

        if (provider == null)
            throw logger.stsNoTokenProviderError("", protocolContext.toString());

        logger.debug("cancelToken::provider=" + provider);

        provider.cancelToken(protocolContext);
    }

    /**
     * <p>
     * Evaluates the validity of the token contained in the specified request context and sets the result in the context itself.
View Full Code Here

Examples of org.picketlink.identity.federation.core.sts.PicketLinkCoreSTS.cancelToken()

        try {
            if (securityToken != null)
                context.setQName(new QName(securityToken.getNamespaceURI(), securityToken.getLocalName()));
            PicketLinkCoreSTS sts = PicketLinkCoreSTS.instance();
            sts.initialize(configuration);
            sts.cancelToken(context);
            // provider.cancelToken(context);
        } catch (ProcessingException e) {
            throw logger.stsError(e);
        }
View Full Code Here

Examples of org.picketlink.identity.federation.core.sts.PicketLinkCoreSTS.cancelToken()

            PicketLinkCoreSTS sts = PicketLinkCoreSTS.instance();
            SAMLProtocolContext samlProtocolContext = new SAMLProtocolContext();
            samlProtocolContext.setIssuedAssertion(assertion);
            try {
                sts.cancelToken(samlProtocolContext);
            } catch (ProcessingException e) {
                logger.error(e);
            }
            httpSession.removeAttribute(GeneralConstants.ASSERTION);
        }
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.