Class Credentials

java.lang.Object
org.glassfish.tyrus.client.auth.Credentials

@Beta public final class Credentials extends Object
Credentials can be used when configuring authentication properties used during client handshake.
Author:
Ondrej Kosatka
See Also:
  • Constructor Details

    • Credentials

      public Credentials(String username, byte[] password)
      Create new credentials.
      Parameters:
      username - Username. Cannot be null.
      password - Password as byte array. Cannot be null.
    • Credentials

      public Credentials(String username, String password)
      Create new credentials.
      Parameters:
      username - Username. Cannot be null.
      password - Password. Cannot be null.
  • Method Details

    • getUsername

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

      public byte[] getPassword()
      Get the password as byte array.
      Returns:
      Password string in byte array representation.
    • toString

      public String toString()
      Overrides:
      toString in class Object