org.apache.http.auth

## Class AuthSchemeRegistry

- java.lang.Object
- - org.apache.http.auth.AuthSchemeRegistry

- All Implemented Interfaces:
    org.apache.http.config.Lookup<AuthSchemeProvider>

  Deprecated.
  (4.3) use `Registry`

      @Contract(threading=SAFE)
      @Deprecated
      public final class AuthSchemeRegistry
      extends Object
      implements org.apache.http.config.Lookup<AuthSchemeProvider>

  Authentication scheme registry that can be used to obtain the corresponding authentication scheme implementation for a given type of authorization challenge.
  Since:
    4.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AuthSchemeRegistry()` Deprecated.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `AuthScheme` | `getAuthScheme(String name, org.apache.http.params.HttpParams params)` Deprecated. Gets the `authentication scheme` with the given name.
    `List<String>` | `getSchemeNames()` Deprecated. Obtains a list containing the names of all registered `authentication schemes`
    `AuthSchemeProvider` | `lookup(String name)` Deprecated.
    `void` | `register(String name, AuthSchemeFactory factory)` Deprecated. Registers a `AuthSchemeFactory` with the given identifier.
    `void` | `setItems(Map<String,AuthSchemeFactory> map)` Deprecated. Populates the internal collection of registered `authentication schemes` with the content of the map passed as a parameter.
    `void` | `unregister(String name)` Deprecated. Unregisters the class implementing an `authentication scheme` with the given name.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AuthSchemeRegistry

          public AuthSchemeRegistry()

      Deprecated.

  - ### Method Detail

    - #### register

          public void register(String name,
                      AuthSchemeFactory factory)

      Deprecated.
      Registers a `AuthSchemeFactory` with the given identifier. If a factory with the given name already exists it will be overridden. This name is the same one used to retrieve the `authentication scheme` from `getAuthScheme(java.lang.String, org.apache.http.params.HttpParams)`.

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

      Parameters:
        `name` - the identifier for this scheme
        `factory` - the `AuthSchemeFactory` class to register
      See Also:
        `getAuthScheme(java.lang.String, org.apache.http.params.HttpParams)`

    - #### unregister

          public void unregister(String name)

      Deprecated.
      Unregisters the class implementing an `authentication scheme` with the given name.
      Parameters:
        `name` - the identifier of the class to unregister

    - #### getAuthScheme

          public AuthScheme getAuthScheme(String name,
                                 org.apache.http.params.HttpParams params)
                                   throws IllegalStateException

      Deprecated.
      Gets the `authentication scheme` with the given name.
      Parameters:
        `name` - the `authentication scheme` identifier
        `params` - the `HTTP parameters` for the authentication scheme.
      Returns:
        `authentication scheme`
      Throws:
        `IllegalStateException` - if a scheme with the given name cannot be found

    - #### getSchemeNames

          public List<String> getSchemeNames()

      Deprecated.
      Obtains a list containing the names of all registered `authentication schemes`
      Returns:
        list of registered scheme names

    - #### setItems

          public void setItems(Map<String,AuthSchemeFactory> map)

      Deprecated.
      Populates the internal collection of registered `authentication schemes` with the content of the map passed as a parameter.
      Parameters:
        `map` - authentication schemes

    - #### lookup

          public AuthSchemeProvider lookup(String name)

      Deprecated.
      Specified by:
        `lookup` in interface `org.apache.http.config.Lookup<AuthSchemeProvider>`

Copyright © 1999–2022 The Apache Software Foundation. All rights reserved.