Class AuthScope

  • Direct Known Subclasses:
    HttpAuthRealm

    @Deprecated
    public class AuthScope
    extends java.lang.Object
    Deprecated.
    Jakarta Commons HttpClient 3.x is deprecated in the Jenkins project. It is not recommended to use it in any new code. Instead, use HTTP client API plugins as a dependency in your code. E.g. Apache HttpComponents Client API 4.x Plugin or Async HTTP Client Plugin.
    The class represents an authentication scope consisting of a host name, a port number, a realm name and an authentication scheme name which Credentials apply to.
    Since:
    3.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static AuthScope ANY
      Deprecated.
      Default scope matching any host, port, realm and authentication scheme.
      static java.lang.String ANY_HOST
      Deprecated.
      The null value represents any host.
      static int ANY_PORT
      Deprecated.
      The -1 value represents any port.
      static java.lang.String ANY_REALM
      Deprecated.
      The null value represents any realm.
      static java.lang.String ANY_SCHEME
      Deprecated.
      The null value represents any authentication scheme.
    • Constructor Summary

      Constructors 
      Constructor Description
      AuthScope​(java.lang.String host, int port)
      Deprecated.
      Creates a new credentials scope for the given host, port, any realm name, and any authentication scheme.
      AuthScope​(java.lang.String host, int port, java.lang.String realm)
      Deprecated.
      Creates a new credentials scope for the given host, port, realm, and any authentication scheme.
      AuthScope​(java.lang.String host, int port, java.lang.String realm, java.lang.String scheme)
      Deprecated.
      Creates a new credentials scope for the given host, port, realm, and authentication scheme.
      AuthScope​(AuthScope authscope)
      Deprecated.
      Creates a copy of the given credentials scope.
    • Field Detail

      • ANY_HOST

        public static final java.lang.String ANY_HOST
        Deprecated.
        The null value represents any host. In the future versions of HttpClient the use of this parameter will be discontinued.
      • ANY_PORT

        public static final int ANY_PORT
        Deprecated.
        The -1 value represents any port.
        See Also:
        Constant Field Values
      • ANY_REALM

        public static final java.lang.String ANY_REALM
        Deprecated.
        The null value represents any realm.
      • ANY_SCHEME

        public static final java.lang.String ANY_SCHEME
        Deprecated.
        The null value represents any authentication scheme.
      • ANY

        public static final AuthScope ANY
        Deprecated.
        Default scope matching any host, port, realm and authentication scheme. In the future versions of HttpClient the use of this parameter will be discontinued.
    • Constructor Detail

      • AuthScope

        public AuthScope​(java.lang.String host,
                         int port,
                         java.lang.String realm,
                         java.lang.String scheme)
        Deprecated.
        Creates a new credentials scope for the given host, port, realm, and authentication scheme.
        Parameters:
        host - the host the credentials apply to. May be set to null if credenticals are applicable to any host.
        port - the port the credentials apply to. May be set to negative value if credenticals are applicable to any port.
        realm - the realm the credentials apply to. May be set to null if credenticals are applicable to any realm.
        scheme - the authentication scheme the credentials apply to. May be set to null if credenticals are applicable to any authentication scheme.
        Since:
        3.0
      • AuthScope

        public AuthScope​(java.lang.String host,
                         int port,
                         java.lang.String realm)
        Deprecated.
        Creates a new credentials scope for the given host, port, realm, and any authentication scheme.
        Parameters:
        host - the host the credentials apply to. May be set to null if credenticals are applicable to any host.
        port - the port the credentials apply to. May be set to negative value if credenticals are applicable to any port.
        realm - the realm the credentials apply to. May be set to null if credenticals are applicable to any realm.
        Since:
        3.0
      • AuthScope

        public AuthScope​(java.lang.String host,
                         int port)
        Deprecated.
        Creates a new credentials scope for the given host, port, any realm name, and any authentication scheme.
        Parameters:
        host - the host the credentials apply to. May be set to null if credenticals are applicable to any host.
        port - the port the credentials apply to. May be set to negative value if credenticals are applicable to any port.
        Since:
        3.0
      • AuthScope

        public AuthScope​(AuthScope authscope)
        Deprecated.
        Creates a copy of the given credentials scope.
        Since:
        3.0
    • Method Detail

      • getHost

        public java.lang.String getHost()
        Deprecated.
        Returns:
        the host
        Since:
        3.0
      • getPort

        public int getPort()
        Deprecated.
        Returns:
        the port
        Since:
        3.0
      • getRealm

        public java.lang.String getRealm()
        Deprecated.
        Returns:
        the realm name
        Since:
        3.0
      • getScheme

        public java.lang.String getScheme()
        Deprecated.
        Returns:
        the scheme type
        Since:
        3.0
      • match

        public int match​(AuthScope that)
        Deprecated.
        Tests if the authentication scopes match.
        Returns:
        the match factor. Negative value signifies no match. Non-negative signifies a match. The greater the returned value the closer the match.
        Since:
        3.0
      • equals

        public boolean equals​(java.lang.Object o)
        Deprecated.
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(Object)
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()