类 ExchangeFilterFunctions.Credentials
- java.lang.Object
- org.springframework.web.reactive.function.client.ExchangeFilterFunctions.Credentials
@Deprecated public static final class ExchangeFilterFunctions.Credentials extends Object
已过时。as of Spring 5.1 in favor of usingHttpHeaders.setBasicAuth(String, String)
while building the request.Stores username and password for HTTP basic authentication.
构造器概要
构造器 构造器 说明 Credentials(String username, String password)
已过时。Create a newCredentials
instance with the given username and password.
方法概要
所有方法 静态方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 static Consumer<Map<String,Object>>
basicAuthenticationCredentials(String username, String password)
已过时。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)
已过时。int
hashCode()
已过时。
构造器详细资料
Credentials
public Credentials(String username, String password)
已过时。Create a newCredentials
instance with the given username and password.- 参数:
username
- the usernamepassword
- the password
方法详细资料
basicAuthenticationCredentials
public static Consumer<Map<String,Object>> basicAuthenticationCredentials(String username, String password)
已过时。Return a Consumer that stores the given username and password as a request attribute of typeCredentials
that is in turn used byExchangeFilterFunctions.basicAuthentication()
.- 参数:
username
- the usernamepassword
- the password- 返回:
- a consumer that can be passed into ClientRequest.Builder.attributes(java.util.function.Consumer)
- 另请参阅:
ClientRequest.Builder.attributes(java.util.function.Consumer)
,ExchangeFilterFunctions.BASIC_AUTHENTICATION_CREDENTIALS_ATTRIBUTE