Search in sources :

Example 1 with Request

use of org.apache.wicket.Request in project gitblit by gitblit.

the class GitBlitWebSession method cacheRequest.

/**
	 * Cache the requested protected resource pending successful authentication.
	 *
	 * @param pageClass
	 */
public void cacheRequest(Class<? extends Page> pageClass) {
    // build absolute url with correctly encoded parameters?!
    Request req = WebRequestCycle.get().getRequest();
    Map<String, ?> params = req.getRequestParameters().getParameters();
    PageParameters pageParams = new PageParameters(params);
    String relativeUrl = WebRequestCycle.get().urlFor(pageClass, pageParams).toString();
    requestUrl = RequestUtils.toAbsolutePath(relativeUrl);
    if (isTemporary()) {
        // we must bind the temporary session into the session store
        // so that we can re-use this session for reporting an error message
        // on the redirected page and continuing the request after
        // authentication.
        bind();
    }
}
Also used : Request(org.apache.wicket.Request) PageParameters(org.apache.wicket.PageParameters)

Aggregations

PageParameters (org.apache.wicket.PageParameters)1 Request (org.apache.wicket.Request)1