Class IPAllowListValidationResult

java.lang.Object
com.atlassian.confluence.security.websudo.IPAllowListValidationResult

public class IPAllowListValidationResult extends Object
This class represents the result of an IP Allow List validation for websudo action.
Since:
8.9
  • Method Details

    • allowed

      public static IPAllowListValidationResult allowed(String clientIP, String requestIPHeader)
      Creates an instance of IPAllowListValidationResult where the client's IP is allowed.
      Parameters:
      clientIP - The client's IP address which was used for validation
      requestIPHeader - The request header used as source of IP address which was used for validation
      Returns:
      An instance of IPAllowListValidationResult.
    • allowed

      public static IPAllowListValidationResult allowed()
      Creates an instance of IPAllowListValidationResult where the client's IP is allowed.
      Returns:
      An instance of IPAllowListValidationResult.
    • denied

      public static IPAllowListValidationResult denied(String clientIP, String requestIPHeader)
      Creates an instance of IPAllowListValidationResult where the client's IP is denied.
      Parameters:
      clientIP - The client's IP address which was used for validation
      requestIPHeader - The request header used as source of IP address which was used for validation
      Returns:
      An instance of IPAllowListValidationResult.
    • isAllowed

      public boolean isAllowed()
      Returns:
      True if the client's IP is allowed for websudo action, false otherwise
    • getClientIP

      public String getClientIP()
      Returns:
      The client's IP address which was used for validation
    • getRequestIPHeader

      public String getRequestIPHeader()
      Returns:
      the request header used as source of IP address which was used for validation