Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public final class

AuthSchemeRegistry

extends Object
java.lang.Object
   ↳ org.apache.http.auth.AuthSchemeRegistry

Class Overview

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

Summary

Public Constructors
AuthSchemeRegistry ()
Public Methods
synchronized AuthScheme getAuthScheme ( String name, HttpParams params)
Gets the authentication scheme with the given name.
synchronized List < String > getSchemeNames ()
Obtains a list containing names of all registered authentication schemes in their default order.
synchronized void register ( String name, AuthSchemeFactory factory)
Registers a AuthSchemeFactory with the given identifier.
synchronized void )">setItems ( Map < String AuthSchemeFactory > map)
Populates the internal collection of registered authentication schemes with the content of the map passed as a parameter.
synchronized void unregister ( String name)
Unregisters the class implementing an authentication scheme with the given name.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public AuthSchemeRegistry ()

Added in API level 1

Public Methods

public synchronized AuthScheme getAuthScheme ( String name, HttpParams params)

Added in API level 1

Gets the authentication scheme with the given name.

Parameters
name the authentication scheme identifier
params the HTTP parameters for the authentication scheme.
Throws
IllegalStateException if a scheme with the given name cannot be found

public synchronized List < String > getSchemeNames ()

Added in API level 1

Obtains a list containing names of all registered authentication schemes in their default order.

Returns
  • list of registered scheme names

public synchronized void register ( String name, AuthSchemeFactory factory)

Added in API level 1

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(String, 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
)">

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

Added in API level 1

Populates the internal collection of registered authentication schemes with the content of the map passed as a parameter.

Parameters
map authentication schemes

public synchronized void unregister ( String name)

Added in API level 1

Unregisters the class implementing an authentication scheme with the given name.

Parameters
name the identifier of the class to unregister