Package org.glassfish.tyrus.client.auth
Class Credentials
- java.lang.Object
-
- org.glassfish.tyrus.client.auth.Credentials
-
@Beta public final class Credentials extends java.lang.Object
Credentials can be used when configuring authentication properties used during client handshake.- Author:
- Ondrej Kosatka (ondrej.kosatka at oracle.com)
- See Also:
ClientProperties.CREDENTIALS
-
-
Constructor Summary
Constructors Constructor Description Credentials(java.lang.String username, byte[] password)
Create new credentials.Credentials(java.lang.String username, java.lang.String password)
Create new credentials.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getPassword()
Get the password as byte array.java.lang.String
getUsername()
Get the username.java.lang.String
toString()
-
-
-
Constructor Detail
-
Credentials
public Credentials(java.lang.String username, byte[] password)
Create new credentials.- Parameters:
username
- Username. Cannot benull
.password
- Password as byte array. Cannot benull
.
-
Credentials
public Credentials(java.lang.String username, java.lang.String password)
Create new credentials.- Parameters:
username
- Username. Cannot benull
.password
- Password. Cannot benull
.
-
-
Method Detail
-
getUsername
public java.lang.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 java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-