Authentication scheme registry that can be used to obtain the corresponding authentication scheme implementation for a given type of authorization challenge. More...
The following notice applies to the original API on which this API is based, and to its documentation. The documentation of this API has been revised from the original.
/* * Copyright (C) 2006 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
Public Member Functions | |
synchronized void | register (final String name, final AuthSchemeFactory factory) |
Registers a com.good.gd.apache.http.auth.AuthSchemeFactory with the given identifier. More... | |
synchronized void | unregister (final String name) |
Unregisters the class implementing an authentication scheme with the given name. More... | |
synchronized AuthScheme | getAuthScheme (final String name, final HttpParams params) throws IllegalStateException |
Gets the authentication scheme with the given name. More... | |
synchronized List< String > | getSchemeNames () |
Obtains a list containing names of all registered authentication schemes in their default order. More... | |
synchronized 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. More... | |
synchronized void register | ( | final String | name, |
final AuthSchemeFactory | factory | ||
) |
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.
name | the identifier for this scheme |
factory | the com.good.gd.apache.http.auth.AuthSchemeFactory class to register |
synchronized void unregister | ( | final String | name | ) |
name | the identifier of the class to unregister |
synchronized AuthScheme getAuthScheme | ( | final String | name, |
final HttpParams | params | ||
) | throws IllegalStateException |
name | the authentication scheme identifier |
params | the HTTP parameters for the authentication scheme. |
IllegalStateException | if a scheme with the given name cannot be found |
synchronized List<String> getSchemeNames | ( | ) |
synchronized void setItems | ( | final Map< String, AuthSchemeFactory > | map | ) |
map | authentication schemes |