Example usage for org.springframework.security.web.util UrlUtils buildFullRequestUrl

List of usage examples for org.springframework.security.web.util UrlUtils buildFullRequestUrl

Introduction

In this page you can find the example usage for org.springframework.security.web.util UrlUtils buildFullRequestUrl.

Prototype

public static String buildFullRequestUrl(String scheme, String serverName, int serverPort, String requestURI,
        String queryString) 

Source Link

Document

Obtains the full URL the client used to make the request.

Usage

From source file:grails.plugin.springsecurity.web.GrailsRedirectStrategy.java

protected String calculateRedirectUrl(HttpServletRequest request, String url) {
    if (UrlUtils.isAbsoluteUrl(url)) {
        return url;
    }/*  ww  w.j  a  v  a2 s  .c  om*/

    url = request.getContextPath() + url;

    if (!useHeaderCheckChannelSecurity) {
        return url;
    }

    return UrlUtils.buildFullRequestUrl(request.getScheme(), request.getServerName(),
            portResolver.getServerPort(request), url, null);
}

From source file:org.springframework.security.web.savedrequest.DefaultSavedRequest.java

/**
 * Indicates the URL that the user agent used for this request.
 *
 * @return the full URL of this request// w  ww.  j  a v  a 2s .c o m
 */
@Override
public String getRedirectUrl() {
    return UrlUtils.buildFullRequestUrl(scheme, serverName, serverPort, requestURI, queryString);
}