Class AuthPolicy


  • @Deprecated
    public abstract class AuthPolicy
    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.
    Authentication policy class. The Authentication policy provides corresponding authentication scheme interfrace for a given type of authorization challenge.

    The following specifications are provided:

    • Basic: Basic authentication scheme as defined in RFC2617 (considered inherently insecure, but most widely supported)
    • Digest: Digest authentication scheme as defined in RFC2617
    • NTLM: The NTLM scheme is a proprietary Microsoft Windows Authentication protocol (considered to be the most secure among currently supported authentication schemes)
    Since:
    3.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String AUTH_SCHEME_PRIORITY
      Deprecated.
      The key used to look up the list of IDs of supported authentication schemes in their order of preference.
      static java.lang.String BASIC
      Deprecated.
      Basic authentication scheme as defined in RFC2617 (considered inherently insecure, but most widely supported)
      static java.lang.String DIGEST
      Deprecated.
      Digest authentication scheme as defined in RFC2617.
      static java.lang.String NTLM
      Deprecated.
      The NTLM scheme is a proprietary Microsoft Windows Authentication protocol (considered to be the most secure among currently supported authentication schemes).
    • Constructor Summary

      Constructors 
      Constructor Description
      AuthPolicy()
      Deprecated.
       
    • Field Detail

      • AUTH_SCHEME_PRIORITY

        public static final java.lang.String AUTH_SCHEME_PRIORITY
        Deprecated.
        The key used to look up the list of IDs of supported authentication schemes in their order of preference. The scheme IDs are stored in a Collection as Strings.

        If several schemes are returned in the WWW-Authenticate or Proxy-Authenticate header, this parameter defines which authentication schemes takes precedence over others. The first item in the collection represents the most preferred authentication scheme, the last item represents the ID of the least preferred one.

        See Also:
        DefaultHttpParams, Constant Field Values
      • NTLM

        public static final java.lang.String NTLM
        Deprecated.
        The NTLM scheme is a proprietary Microsoft Windows Authentication protocol (considered to be the most secure among currently supported authentication schemes).
        See Also:
        Constant Field Values
      • DIGEST

        public static final java.lang.String DIGEST
        Deprecated.
        Digest authentication scheme as defined in RFC2617.
        See Also:
        Constant Field Values
      • BASIC

        public static final java.lang.String BASIC
        Deprecated.
        Basic authentication scheme as defined in RFC2617 (considered inherently insecure, but most widely supported)
        See Also:
        Constant Field Values
    • Constructor Detail

      • AuthPolicy

        public AuthPolicy()
        Deprecated.
    • Method Detail

      • registerAuthScheme

        public static void registerAuthScheme​(java.lang.String id,
                                              java.lang.Class clazz)
        Deprecated.
        Registers a class implementing an authentication scheme with the given identifier. If a class with the given ID already exists it will be overridden. This ID is the same one used to retrieve the authentication scheme from getAuthScheme(String).

        Please note that custom authentication preferences, if used, need to be updated accordingly for the new authentication scheme to take effect.

        Parameters:
        id - the identifier for this scheme
        clazz - the class to register
        See Also:
        getAuthScheme(String), AUTH_SCHEME_PRIORITY
      • unregisterAuthScheme

        public static void unregisterAuthScheme​(java.lang.String id)
        Deprecated.
        Unregisters the class implementing an authentication scheme with the given ID.
        Parameters:
        id - the ID of the class to unregister