org.apache.hc.client5.http.auth

## Interface CredentialsStore

- All Superinterfaces:
    CredentialsProvider
  All Known Implementing Classes:
    BasicCredentialsProvider, SystemDefaultCredentialsProvider

      public interface CredentialsStore
      extends CredentialsProvider

  Abstract store of authentication 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

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Clears all credentials.
    `void` | `setCredentials(AuthScope authScope, Credentials credentials)` Sets the `credentials` for the given authentication scope.

    - ### Methods inherited from interface org.apache.hc.client5.http.auth.CredentialsProvider

      `getCredentials`

- - ### 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:
        `CredentialsProvider.getCredentials(AuthScope, org.apache.hc.core5.http.protocol.HttpContext)`

    - #### clear

          void clear()

      Clears all credentials.

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