/** * Sends a temporary redirect to the specified redirect location URL. * * @param location Location URL to redirect to * * @throws IllegalStateException if this response has * already been committed * @throws IOException if an input/output error occurs */ public void sendRedirect(String location) throws IOException { sendRedirect(location, true); }
/** * Send a temporary redirect to the specified redirect location URL. * * @param location Location URL to redirect to * * @exception IllegalStateException if this response has * already been committed * @exception IOException if an input/output error occurs */ @Override public void sendRedirect(String location) throws IOException { sendRedirect(location, SC_FOUND); }
/** * Send a temporary redirect to the specified redirect location URL. * * @param location Location URL to redirect to * * @exception IllegalStateException if this response has * already been committed * @exception IOException if an input/output error occurs */ @Override public void sendRedirect(String location) throws IOException { sendRedirect(location, SC_FOUND); }
/** * Send a temporary redirect to the specified redirect location URL. * * @param location Location URL to redirect to * * @exception IllegalStateException if this response has * already been committed * @exception IOException if an input/output error occurs */ @Override public void sendRedirect(String location) throws IOException { sendRedirect(location, SC_FOUND); }
@Override public void sendRedirect(String location) throws IOException { // Disallow operation if the object has gone out of scope if (response == null) { throw new IllegalStateException(rb.getString(LogFacade.NULL_RESPONSE_OBJECT)); } if (isCommitted()) throw new IllegalStateException (/*sm.getString("responseBase.reset.ise")*/); response.setAppCommitted(true); response.sendRedirect(location); }
public void sendRedirect(String location) throws IOException { if (isCommitted()) throw new IllegalStateException (/*sm.getString("responseBase.reset.ise")*/); response.setAppCommitted(true); response.sendRedirect(location); }
public void sendRedirect(String location) throws IOException { if (isCommitted()) throw new IllegalStateException (/*sm.getString("responseBase.reset.ise")*/); response.setAppCommitted(true); response.sendRedirect(location); }
@Override public void sendRedirect(String location) throws IOException { if (isCommitted()) throw new IllegalStateException (/*sm.getString("responseBase.reset.ise")*/); response.setAppCommitted(true); response.sendRedirect(location); }
public void sendRedirect(String location) throws IOException { if (isCommitted()) throw new IllegalStateException (/*sm.getString("responseBase.reset.ise")*/); response.setAppCommitted(true); response.sendRedirect(location); }
@Override public void sendRedirect(String location) throws IOException { if (isCommitted()) throw new IllegalStateException (/*sm.getString("responseBase.reset.ise")*/); response.setAppCommitted(true); response.sendRedirect(location); }
@Override public void sendRedirect(String location) throws IOException { if (isCommitted()) throw new IllegalStateException (/*sm.getString("responseBase.reset.ise")*/); response.setAppCommitted(true); response.sendRedirect(location); }
public boolean initialInteraction(Request request, Response response) throws IOException { HttpSession session = request.getSession(); Map<String, String> params = new HashMap<String, String>(); params.put(OAuthConstants.REDIRECT_URI_PARAMETER, returnURL); params.put(OAuthConstants.CLIENT_ID_PARAMETER, clientID); if (scope != null) { params.put(OAuthConstants.SCOPE_PARAMETER, scope); } String location = new StringBuilder(FacebookConstants.SERVICE_URL).append("?").append(util.createQueryString(params)) .toString(); try { session.setAttribute("STATE", STATES.AUTH.name()); if (trace) log.trace("Redirect:" + location); response.sendRedirect(location); return false; } catch (IOException e) { throw new RuntimeException(e); } }
public boolean initialInteraction(Request request, Response response) throws IOException { HttpSession session = request.getSession(); Map<String, String> params = new HashMap<String, String>(); params.put(OAuthConstants.REDIRECT_URI_PARAMETER, returnURL); params.put(OAuthConstants.CLIENT_ID_PARAMETER, clientID); if (scope != null) { params.put(OAuthConstants.SCOPE_PARAMETER, scope); } String location = new StringBuilder(FacebookConstants.SERVICE_URL).append("?").append(util.createQueryString(params)) .toString(); try { session.setAttribute("STATE", STATES.AUTH.name()); if (trace) log.trace("Redirect:" + location); response.sendRedirect(location); return false; } catch (IOException e) { throw new RuntimeException(e); } }
@Override public void sendRedirect(String location) throws IOException { if (isCommitted()) { throw new IllegalStateException (sm.getString("coyoteResponse.sendRedirect.ise")); } response.setAppCommitted(true); response.sendRedirect(location); }
@Override public void sendRedirect(String location) throws IOException { if (isCommitted()) { throw new IllegalStateException (sm.getString("coyoteResponse.sendRedirect.ise")); } response.setAppCommitted(true); response.sendRedirect(location); }
@Override public void sendRedirect(String location) throws IOException { if (isCommitted()) { throw new IllegalStateException (sm.getString("coyoteResponse.sendRedirect.ise")); } response.setAppCommitted(true); response.sendRedirect(location); }
@Override public void sendRedirect(String location) throws IOException { if (isCommitted()) { throw new IllegalStateException (sm.getString("coyoteResponse.sendRedirect.ise")); } response.setAppCommitted(true); response.sendRedirect(location); }
@Override public void sendRedirect(String location) throws IOException { if (isCommitted()) { throw new IllegalStateException (sm.getString("coyoteResponse.sendRedirect.ise")); } response.setAppCommitted(true); response.sendRedirect(location); }
@Override public void invoke(final Request request, final Response response) throws IOException, ServletException { final String destination = router.route(request.getRequestURI()); if (destination == null) { getNext().invoke(request, response); return; } if (router.hasPrefix()) { request.getRequestDispatcher(destination).forward(request, response); } else { response.sendRedirect(destination); } }
protected void redirectAccessCode(boolean sso, Response response, String redirect_uri, String client_id, String state, GenericPrincipal gp) throws IOException { SkeletonKeyToken token = buildToken(gp); AccessCode code = new AccessCode(); code.setToken(token); code.setClient(client_id); code.setSso(sso); code.setRedirect(redirect_uri); int expiration = skeletonKeyConfig.getAccessCodeLifetime() == 0 ? 300 : skeletonKeyConfig.getAccessCodeLifetime(); code.setExpiration((System.currentTimeMillis() / 1000) + expiration); accessCodeMap.put(code.getId(), code); LogMessages.LOGGER.debug(Messages.MESSAGES.signAccessCode()); String accessCode = null; accessCode = new JWSBuilder().content(code.getId().getBytes(StandardCharsets.UTF_8)).rsa256(realmPrivateKey); LogMessages.LOGGER.debug(Messages.MESSAGES.buildRedirect()); UriBuilder redirectUri = UriBuilder.fromUri(redirect_uri).queryParam("code", accessCode); if (state != null) redirectUri.queryParam("state", state); response.sendRedirect(redirectUri.toTemplate()); LogMessages.LOGGER.debug(Messages.MESSAGES.endOAuthAuthenticate()); }