Package com.codeborne.selenide
Record Class BasicAuthCredentials
java.lang.Object
java.lang.Record
com.codeborne.selenide.BasicAuthCredentials
- All Implemented Interfaces:
Credentials
public record BasicAuthCredentials(String domain, String login, String password)
extends Record
implements Credentials
-
Constructor Summary
ConstructorsConstructorDescriptionBasicAuthCredentials(String login, String password) Security warning: If you are using Selenide proxy, use another constructor (with domain parameter).BasicAuthCredentials(String domain, String login, String password) Creates an instance of aBasicAuthCredentialsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondomain()Returns the value of thedomainrecord component.encode()The resulting string is base64 encoded (e.g.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.login()Returns the value of theloginrecord component.password()Returns the value of thepasswordrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
BasicAuthCredentials
Security warning: If you are using Selenide proxy, use another constructor (with domain parameter). This constructor is dangerous: without domain specified, Selenide proxy will send your credentials to ALL domains, including 3rd party services that your AUT or browser might call.If proxy is disabled, it's totally ok to use this constructor.
-
BasicAuthCredentials
Creates an instance of aBasicAuthCredentialsrecord class.- Parameters:
domain- the value for thedomainrecord componentlogin- the value for theloginrecord componentpassword- the value for thepasswordrecord component
-
-
Method Details
-
encode
The resulting string is base64 encoded (e.g. "YWxhZGRpbjpvcGVuc2VzYW1l").- Specified by:
encodein interfaceCredentials- Returns:
- encoded string
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
domain
Returns the value of thedomainrecord component.- Specified by:
domainin interfaceCredentials- Returns:
- the value of the
domainrecord component
-
login
Returns the value of theloginrecord component.- Returns:
- the value of the
loginrecord component
-
password
Returns the value of thepasswordrecord component.- Returns:
- the value of the
passwordrecord component
-