Class BasicCredentials

java.lang.Object
org.forgerock.http.header.authorization.BasicCredentials

public class BasicCredentials extends Object
A rich representation of basic credentials.
  • Field Details

  • Constructor Details

    • BasicCredentials

      public BasicCredentials(String username, String password)
      Construct a new set of Basic authorization credentials.
      Parameters:
      username - The username.
      password - The password.
  • Method Details

    • getUsername

      public String getUsername()
      Get the username.
      Returns:
      The username.
    • getPassword

      public String getPassword()
      Get the password.
      Returns:
      The password.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public String toString(Charset charset)
      Get the string credentials in the specified charset.
      Parameters:
      charset - The charset to encode as.
      Returns:
      The credentials string.