Interface ClientInfoService

  • All Known Implementing Classes:
    ClientInfoServiceImpl

    public interface ClientInfoService
    Service that can be used to retrieve information about DSpace clients
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      String getClientIp​(String remoteIp, String xForwardedForHeaderValue)
      Get the client IP of this request taking into account the X-Forwarded-For header and the "useProxies" setting
      String getClientIp​(javax.servlet.http.HttpServletRequest request)
      Get the client IP of this request taking into account the X-Forwarded-For header and the "useProxies" setting
      boolean isUseProxiesEnabled()
      Does DSpace take into account HTTP proxy headers or not
    • Method Detail

      • getClientIp

        String getClientIp​(javax.servlet.http.HttpServletRequest request)
        Get the client IP of this request taking into account the X-Forwarded-For header and the "useProxies" setting
        Parameters:
        request - The client HTTP request
        Returns:
        The IP address of the originating client
      • getClientIp

        String getClientIp​(String remoteIp,
                           String xForwardedForHeaderValue)
        Get the client IP of this request taking into account the X-Forwarded-For header and the "useProxies" setting
        Parameters:
        remoteIp - the remote address of the current request
        xForwardedForHeaderValue - The value of the X-Forwarded-For header
        Returns:
        The IP address of the originating client
      • isUseProxiesEnabled

        boolean isUseProxiesEnabled()
        Does DSpace take into account HTTP proxy headers or not
        Returns:
        true if this is the case, false otherwise