• BlackBerry Dynamics
  • Runtime library for Android applications
  • 12.0.1.79
AuthSchemeRegistry Class Reference

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

Description

Author
Oleg Kalnichevski
Version
Revision
652950
Since
4.0

Notice

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...
 

Member Function Documentation

◆ register()

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.

Parameters
namethe identifier for this scheme
factorythe com.good.gd.apache.http.auth.AuthSchemeFactory class to register
See also
getAuthScheme

◆ unregister()

synchronized void unregister ( final String  name)
Parameters
namethe identifier of the class to unregister

◆ getAuthScheme()

synchronized AuthScheme getAuthScheme ( final String  name,
final HttpParams  params 
) throws IllegalStateException
Parameters
namethe authentication scheme identifier
paramsthe HTTP parameters for the authentication scheme.
Returns
authentication scheme
Exceptions
IllegalStateExceptionif a scheme with the given name cannot be found

◆ getSchemeNames()

synchronized List<String> getSchemeNames ( )
Returns
list of registered scheme names

◆ setItems()

synchronized void setItems ( final Map< String, AuthSchemeFactory map)
Parameters
mapauthentication schemes