Class BasicAuthCredentials

java.lang.Object
com.codeborne.selenide.BasicAuthCredentials
All Implemented Interfaces:
Credentials

@ParametersAreNonnullByDefault public class BasicAuthCredentials extends Object implements Credentials
  • Field Details

    • domain

      public final String domain
    • login

      public final String login
    • password

      public final String password
  • Constructor Details

    • BasicAuthCredentials

      public BasicAuthCredentials(String login, String password)
      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

      public BasicAuthCredentials(String domain, String login, String password)
  • Method Details

    • domain

      @Nonnull public String domain()
      Specified by:
      domain in interface Credentials
    • encode

      @CheckReturnValue @Nonnull public String encode()
      The resulting string is base64 encoded (YWxhZGRpbjpvcGVuc2VzYW1l).
      Specified by:
      encode in interface Credentials
      Returns:
      encoded string
    • toString

      @CheckReturnValue @Nonnull public String toString()
      Overrides:
      toString in class Object