code: public Optional<Object> getContextForToken(String key, String token) {
      Object context = validateTokenAndGetContext(key, token).second();
      return null != context ? Optional.of(context) : Optional.absent();
    }
docs: Validate a short lived token and returning the associated context
  The token is removed if found and valid.
  @param key cacheKey
  @param token temporary token to validate
  @return an optional. The context will be absent if either the token is invalid of the context is null.