@Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException,
            IOException {
        logger.debug("Refreshing authentication token."); //$NON-NLS-1$
        ITokenGenerator tokenGenerator = getTokenGenerator();
        BearerTokenCredentialsBean tokenBean = tokenGenerator.generateToken(req);
        ObjectMapper mapper = new ObjectMapper();
        resp.setContentType("application/json"); //$NON-NLS-1$
        resp.setDateHeader("Date", System.currentTimeMillis()); //$NON-NLS-1$
        resp.setDateHeader("Expires", System.currentTimeMillis() - 86400000L); //$NON-NLS-1$
        resp.setHeader("Pragma", "no-cache"); //$NON-NLS-1$ //$NON-NLS-2$
        resp.setHeader("Cache-control", "no-cache, no-store, must-revalidate"); //$NON-NLS-1$ //$NON-NLS-2$
        mapper.writer().writeValue(resp.getOutputStream(), tokenBean);
    }
@see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
manager/ui/war/src/main/java/io/apiman/manager/ui/server/servlets/TokenRefreshServlet.java