code: private void processTokenRequest(HttpServletResponse response, JwtConfig jwtConfig) throws IOException {
  
  		String tokenString = new TokenBuilder().createTokenString(jwtConfig);
  		addNoCacheHeaders(response);
  		response.setStatus(200);
  
  		if (tokenString == null) {
  			return;
  		}
  		try {
  			PrintWriter pw = response.getWriter();
  			response.setHeader(WebConstants.HTTP_HEADER_CONTENT_TYPE, WebConstants.HTTP_CONTENT_TYPE_JSON);
  			pw.write("{\"token\": \"" + tokenString + "\"}");
  			pw.flush();
  			pw.close();
  		} catch (IOException e) {
  			if (tc.isDebugEnabled()) {
  				Tr.debug(tc, "Caught an exception attempting to get the response writer: " + e.getLocalizedMessage());
  			}
  		}
  	}
docs: produces a JWT token based upon the jwt Configuration, and the security
  credentials of the authenticated user that called this method. Returns
  the token as JSON in the response.
  
  @param response
  @param jwtConfig
  @throws IOException