public void removeAccessTokenUsingRefreshToken(String refreshToken) {
    String tokenId = null;

    try {
      tokenId =
          dynamoDBTemplate.queryUnique(
              schema.getAccessTableName(),
              schema.getAccessIndexRefreshToken(), //
              Collections.singletonMap(
                  schema.getAccessColumnRefreshToken(),
                  new Condition()
                      .withAttributeValueList(new AttributeValue(extractTokenKey(refreshToken)))
                      .withComparisonOperator(ComparisonOperator.EQ)), //
              new ObjectExtractor<String>() {

                public String extract(Map<String, AttributeValue> values) {
                  return values.get(schema.getAccessColumnTokenId()).getS();
                }
              },
              schema.getAccessColumnTokenId());
    } catch (EmptyResultDataAccessException | IncorrectResultSizeDataAccessException e) {
      if (LOG.isDebugEnabled()) {
        LOG.debug("Failed to find access token for refresh token " + refreshToken);
      }
    }

    if (tokenId == null) {
      return;
    }

    dynamoDBTemplate.delete(
        schema.getAccessTableName(),
        Collections.singletonMap(schema.getAccessColumnTokenId(), new AttributeValue(tokenId)));
  }
 public void removeRefreshToken(String token) {
   dynamoDBTemplate.delete(
       schema.getRefreshTableName(),
       Collections.singletonMap(
           schema.getRefreshColumnTokenId(), new AttributeValue(extractTokenKey(token))));
 }
 public void removeAccessToken(String tokenValue) {
   dynamoDBTemplate.delete(
       schema.getAccessTableName(),
       Collections.singletonMap(
           schema.getAccessColumnTokenId(), new AttributeValue(extractTokenKey(tokenValue))));
 }