Record Class ExchangeFilterFunctions.Credentials
java.lang.Object
java.lang.Record
cn.taketoday.web.reactive.function.client.ExchangeFilterFunctions.Credentials
public static record ExchangeFilterFunctions.Credentials(String username, String password)
extends Record
Stores username and password for HTTP basic authentication.
-
字段概要
字段 -
构造器概要
构造器构造器说明Credentials(String username, String password) Create a newCredentialsinstance with the given username and password. -
方法概要
修饰符和类型方法说明basicAuthenticationCredentials(String username, String password) Return a Consumer that stores the given username and password as a request attribute of typeCredentialsthat is in turn used byExchangeFilterFunctions.basicAuthentication().final boolean指示某个其他对象是否“等于”此对象。final inthashCode()返回此对象的哈希代码值。password()返回password记录组件的值。final StringtoString()返回此记录的字符串表示形式。username()返回username记录组件的值。
-
字段详细资料
-
username
username记录组件的字段。 -
password
password记录组件的字段。
-
-
构造器详细资料
-
Credentials
Create a newCredentialsinstance 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 typeCredentialsthat is in turn used byExchangeFilterFunctions.basicAuthentication().- 参数:
username- the usernamepassword- the password- 返回:
- a consumer that can be passed into ClientRequest.Builder.attributes(Consumer)
- 另请参阅:
-
toString
返回此记录的字符串表示形式。此表示形式包含类型的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 此记录中的所有组件都使用Objects::equals(Object,Object)进行比较。 -
username
返回username记录组件的值。- 返回:
username记录组件的值
-
password
返回password记录组件的值。- 返回:
password记录组件的值
-