Class BasicCredentials


  • public class BasicCredentials
    extends Object
    A rich representation of basic credentials.
    • Constructor Detail

      • BasicCredentials

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

      • getUsername

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

        public String getPassword()
        Get the password.
        Returns:
        The password.
      • 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.