code: @POST
    @Produces(value = "text/plain")
    public String addNewID(String str)
    {
      Subject user = SecurityUtils.getSubject();
      
      String remoteIP = request.getRemoteAddr().replaceAll("[.:]", "_");
      user.checkPermission("shortener:create:" + remoteIP);
      
      return shortenerDao.shorten(str, "" + user.getPrincipal()).toString();
    }
docs: Takes a URI and returns an ID.
  
  In order to access this function the
  {@code
  shortener:create:<ip>
  }
  right is needed. "&lt;ip&gt;" is replaced by the IP of the client which makes this request.
  Either IPv4 or IPv6 can be used. The dots (IPv4) or colons (IPv6)
  must be replaced with underscores since they conflict with the Apache
  Shiro {@link WildcardPermission} format.
  
  @param str The string to shorten.
  @return