Class ExchangeFilterFunctions.Credentials
- java.lang.Object
- org.springframework.web.reactive.function.client.ExchangeFilterFunctions.Credentials
- Enclosing class:
- ExchangeFilterFunctions
@Deprecated public static final class ExchangeFilterFunctions.Credentials extends Object
Deprecated.as of Spring 5.1 in favor of usingHttpHeaders.setBasicAuth(String, String)
while building the request.Stores username and password for HTTP basic authentication.
Constructor Summary
Constructors Constructor Description Credentials(String username, String password)
Deprecated.Create a newCredentials
instance with the given username and password.
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description 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 typeCredentials
that is in turn used byExchangeFilterFunctions.basicAuthentication()
.boolean
equals(Object other)
Deprecated.int
hashCode()
Deprecated.
Constructor Detail
Credentials
public Credentials(String username, String password)
Deprecated.Create a newCredentials
instance with the given username and password.- Parameters:
username
- the usernamepassword
- 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 typeCredentials
that is in turn used byExchangeFilterFunctions.basicAuthentication()
.- Parameters:
username
- the usernamepassword
- 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