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 class

BasicCredentialsProvider

extends Object
implements CredentialsProvider
java.lang.Object
   ↳ org.apache.http.impl.client.BasicCredentialsProvider

Class Overview

Default implementation of CredentialsProvider

Summary

Public Constructors
BasicCredentialsProvider ()
Default constructor.
Public Methods
synchronized void clear ()
Clears all credentials.
synchronized Credentials getCredentials ( AuthScope authscope)
Get the credentials for the given authentication scope.
synchronized void setCredentials ( AuthScope authscope, Credentials credentials)
Sets the credentials for the given authentication scope.
String toString ()
Returns a string containing a concise, human-readable description of this object.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.http.client.CredentialsProvider

Public Constructors

public BasicCredentialsProvider ()

Added in API level 1

Default constructor.

Public Methods

public synchronized void clear ()

Added in API level 1

Clears all credentials.

public synchronized Credentials getCredentials ( AuthScope authscope)

Added in API level 1

Get the credentials for the given authentication scope.

Parameters
authscope the authentication scope
Returns
  • the credentials

public synchronized void setCredentials ( AuthScope authscope, Credentials credentials)

Added in API level 1

Sets the credentials for the given authentication scope. Any previous credentials for the given scope will be overwritten.

Parameters
authscope the authentication scope
credentials the authentication credentials for the given scope.

public String toString ()

Added in API level 1

Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:

          getClass().getName() + '@' + Integer.toHexString(hashCode())
         

See Writing a useful toString method if you intend implementing your own toString method.

Returns
  • a printable representation of this object.