CredentialsProvider (Apache HttpClient 4.5.13 API)
Date: 2020-10-03

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.http.client
Interface CredentialsProvider

All Known Implementing Classes:
  BasicCredentialsProvider, SystemDefaultCredentialsProvider

    public interface CredentialsProvider

Abstract credentials provider that maintains a collection of user credentials.

Implementations of this interface must be thread-safe. Access to shared data must be synchronized as methods of this interface may be executed from multiple threads.

Since:
  4.0

Method Summary
`void` | `clear()` Clears all credentials.
`Credentials` | `getCredentials(AuthScope authscope)` Get the `credentials` for the given authentication scope.
`void` | `setCredentials(AuthScope authscope, Credentials credentials)` Sets the `credentials` for the given authentication scope.

Method Detail

### setCredentials

    void setCredentials(AuthScope authscope,
                        Credentials credentials)

  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.
  See Also:
    `getCredentials(AuthScope)`

### getCredentials

    Credentials getCredentials(AuthScope authscope)

  Get the `credentials` for the given authentication scope.

  Parameters:
    `authscope` - the `authentication scope`
  Returns:
    the credentials
  See Also:
    `setCredentials(AuthScope, Credentials)`

### clear

    void clear()

  Clears all credentials.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999–2020 The Apache Software Foundation. All rights reserved.