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

The class represents an authentication scope consisting of a host name, a port number, a realm name and an authentication scheme name which Credentials apply to. More...

Description

Author
Oleg Kalnichevski
Adrian Sutton
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

 AuthScope (final String host, int port, final String realm, final String scheme)
 Creates a new credentials scope for the given host, port, realm, and authentication scheme. More...
 
 AuthScope (final String host, int port, final String realm)
 Creates a new credentials scope for the given host, port, realm, and any authentication scheme. More...
 
 AuthScope (final String host, int port)
 Creates a new credentials scope for the given host, port, any realm name, and any authentication scheme. More...
 
 AuthScope (final AuthScope authscope)
 Creates a copy of the given credentials scope.
 
String getHost ()
 
int getPort ()
 
String getRealm ()
 
String getScheme ()
 
int match (final AuthScope that)
 Tests if the authentication scopes match. More...
 
boolean equals (Object o)
 
String toString ()
 
int hashCode ()
 

Static Public Attributes

static final String ANY_HOST = null
 The null value represents any host. More...
 
static final int ANY_PORT = -1
 The -1 value represents any port.
 
static final String ANY_REALM = null
 The null value represents any realm.
 
static final String ANY_SCHEME = null
 The null value represents any authentication scheme.
 
static final AuthScope ANY = new AuthScope(ANY_HOST, ANY_PORT, ANY_REALM, ANY_SCHEME)
 Default scope matching any host, port, realm and authentication scheme. More...
 

Constructor & Destructor Documentation

◆ AuthScope() [1/3]

AuthScope ( final String  host,
int  port,
final String  realm,
final String  scheme 
)
Parameters
hostthe host the credentials apply to. May be set to null if credenticals are applicable to any host.
portthe port the credentials apply to. May be set to negative value if credenticals are applicable to any port.
realmthe realm the credentials apply to. May be set to null if credenticals are applicable to any realm.
schemethe authentication scheme the credentials apply to. May be set to null if credenticals are applicable to any authentication scheme.

◆ AuthScope() [2/3]

AuthScope ( final String  host,
int  port,
final String  realm 
)
Parameters
hostthe host the credentials apply to. May be set to null if credenticals are applicable to any host.
portthe port the credentials apply to. May be set to negative value if credenticals are applicable to any port.
realmthe realm the credentials apply to. May be set to null if credenticals are applicable to any realm.

◆ AuthScope() [3/3]

AuthScope ( final String  host,
int  port 
)
Parameters
hostthe host the credentials apply to. May be set to null if credenticals are applicable to any host.
portthe port the credentials apply to. May be set to negative value if credenticals are applicable to any port.

Member Function Documentation

◆ getHost()

String getHost ( )
Returns
the host

◆ getPort()

int getPort ( )
Returns
the port

◆ getRealm()

String getRealm ( )
Returns
the realm name

◆ getScheme()

String getScheme ( )
Returns
the scheme type

◆ match()

int match ( final AuthScope  that)
Returns
the match factor. Negative value signifies no match. Non-negative signifies a match. The greater the returned value the closer the match.

◆ equals()

boolean equals ( Object  o)
See also
java.lang.Object::equals(Object)

◆ toString()

String toString ( )
See also
java.lang.Object::toString()

◆ hashCode()

int hashCode ( )
See also
java.lang.Object::hashCode()

Member Data Documentation

◆ ANY_HOST

final String ANY_HOST = null
static

In the future versions of HttpClient the use of this parameter will be discontinued.

◆ ANY

In the future versions of HttpClient the use of this parameter will be discontinued.