org.springframework.web.reactive.function.client

## Class ExchangeFilterFunctions.Credentials

- java.lang.Object
- - org.springframework.web.reactive.function.client.ExchangeFilterFunctions.Credentials

Enclosing class:
  ExchangeFilterFunctions

Deprecated.
as of Spring 5.1 in favor of using `HttpHeaders.setBasicAuth(String, String)` while building the request.

    @Deprecated
    public static final class ExchangeFilterFunctions.Credentials
    extends Object

Stores username and password for HTTP basic authentication.

### Constructor Summary

Constructors
Constructor and Description
`Credentials(String username, String password)` Deprecated. Create a new `Credentials` instance with the given username and password.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
`static Consumer<Map<String,Object>>` `basicAuthenticationCredentials(String username, String password)` Deprecated. Return a Consumer that stores the given username and password as a request attribute of type `Credentials` that is in turn used by `ExchangeFilterFunctions.basicAuthentication()`.
`boolean` `equals(Object other)` Deprecated.
`int` `hashCode()` Deprecated.

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### Credentials

    public Credentials(String username,
                       String password)

Deprecated.
Create a new `Credentials` instance with the given username and password.

Parameters:
  `username` - the username
  `password` - the password

### Method Detail

#### basicAuthenticationCredentials

    public static Consumer<Map<String,Object>> basicAuthenticationCredentials(String username,
                                                                              String password)

Deprecated.
Return a Consumer that stores the given username and password as a request attribute of type `Credentials` that is in turn used by `ExchangeFilterFunctions.basicAuthentication()`.

Parameters:
  `username` - the username
  `password` - the password
Returns:
  a consumer that can be passed into ClientRequest.Builder.attributes(java.util.function.Consumer)
See Also:
  `ClientRequest.Builder.attributes(java.util.function.Consumer)`, `ExchangeFilterFunctions.BASIC_AUTHENTICATION_CREDENTIALS_ATTRIBUTE`

#### equals

    public boolean equals(@Nullable
                          Object other)

Deprecated.

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Deprecated.

Overrides:
  `hashCode` in class `Object`