Top Description Fields Constructors Methods
org.apache.http.auth

public final Class AuthSchemeRegistry

extends Object
implements Lookup<AuthSchemeProvider>
Class Inheritance
All Implemented Interfaces
org.apache.http.config.Lookup
Annotations
@Contract
threading:SAFE
@Deprecated
Imports
java.util.ArrayList, .List, .Locale, .Map, java.util.concurrent.ConcurrentHashMap, org.apache.http.HttpRequest, org.apache.http.annotation.Contract, .ThreadingBehavior, org.apache.http.config.Lookup, org.apache.http.params.HttpParams, org.apache.http.protocol.ExecutionContext, .HttpContext, org.apache.http.util.Args

Deprecated

(4.3) use org.apache.http.config.Registry

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

Field Summary

Modifier and TypeField and Description
private final ConcurrentHashMap<String, AuthSchemeFactory>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public AuthScheme
getAuthScheme(final String
the authentication scheme identifier
name
,
final HttpParams
the HTTP parameters for the authentication scheme.
params
)

Deprecated as a consequence of HttpParams being deprecated.
Gets the authentication scheme with the given name.
public List<String>

Returns:

list of registered scheme names
getSchemeNames
()

Obtains a list containing the names of all registered authentication schemes

public AuthSchemeProvider
public void
register(final String
the identifier for this scheme
name
,
final AuthSchemeFactory
the AuthSchemeFactory class to register
factory
)

Deprecated as a consequence of AuthSchemeFactory being deprecated.
Registers a AuthSchemeFactory with the given identifier.
public void
setItems(final Map<String, AuthSchemeFactory>
authentication schemes
map
)

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

public void
unregister(final String
the identifier of the class to unregister
name
)

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

registeredSchemesback to summary
private final ConcurrentHashMap<String, AuthSchemeFactory> registeredSchemes

Constructor Detail

AuthSchemeRegistryback to summary
public AuthSchemeRegistry()

Method Detail

getAuthSchemeback to summary
public AuthScheme getAuthScheme(final String name, final HttpParams params) throws IllegalStateException

Deprecated

as a consequence of HttpParams being deprecated. See corresponding docs for further information.

Gets the authentication scheme with the given name.

Parameters
name:String

the authentication scheme identifier

params:HttpParams

the HTTP parameters for the authentication scheme.

Returns:AuthScheme

authentication scheme

Exceptions
IllegalStateException:
if a scheme with the given name cannot be found
getSchemeNamesback to summary
public List<String> getSchemeNames()

Obtains a list containing the names of all registered authentication schemes

Returns:List<String>

list of registered scheme names

lookupback to summary
public AuthSchemeProvider lookup(final String name)

Implements org.apache.http.config.Lookup.lookup.

Annotations
@Override
registerback to summary
public void register(final String name, final AuthSchemeFactory factory)

Deprecated

as a consequence of AuthSchemeFactory being deprecated. See corresponding docs for further information.

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.

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

Parameters
name:String

the identifier for this scheme

factory:AuthSchemeFactory

the AuthSchemeFactory class to register

See Also
getAuthScheme
setItemsback to summary
public void setItems(final Map<String, AuthSchemeFactory> map)

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

Parameters
map:Map<String, AuthSchemeFactory>

authentication schemes

unregisterback to summary
public void unregister(final String name)

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

Parameters
name:String

the identifier of the class to unregister