Top Description Fields Constructors Methods
org.glassfish.tyrus.client.auth

public final Class Credentials

extends Object
Class Inheritance
Annotations
@Beta
Imports
org.glassfish.tyrus.client.ClientProperties, org.glassfish.tyrus.core.Beta, org.glassfish.tyrus.core.l10n.LocalizationMessages

Credentials can be used when configuring authentication properties used during client handshake.
Author
Ondrej Kosatka
See Also
ClientProperties#CREDENTIALS

Field Summary

Modifier and TypeField and Description
private final byte[]
private final String

Constructor Summary

AccessConstructor and Description
public
Credentials(String
Username. Cannot be null.
username
,
byte[]
Password as byte array. Cannot be null.
password
)

Create new credentials.

public
Credentials(String
Username. Cannot be null.
username
,
String
Password. Cannot be null.
password
)

Create new credentials.

Method Summary

Modifier and TypeMethod and Description
public byte[]

Returns:

Password string in byte array representation.
getPassword
()

Get the password as byte array.

public String

Returns:

username.
getUsername
()

Get the username.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

passwordback to summary
private final byte[] password
usernameback to summary
private final String username

Constructor Detail

Credentialsback to summary
public Credentials(String username, byte[] password)

Create new credentials.

Parameters
username:String

Username. Cannot be null.

password:byte[]

Password as byte array. Cannot be null.

Credentialsback to summary
public Credentials(String username, String password)

Create new credentials.

Parameters
username:String

Username. Cannot be null.

password:String

Password. Cannot be null.

Method Detail

getPasswordback to summary
public byte[] getPassword()

Get the password as byte array.

Returns:byte[]

Password string in byte array representation.

getUsernameback to summary
public String getUsername()

Get the username.

Returns:String

username.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object