java.net

Class PasswordAuthentication

public final class PasswordAuthentication extends Object

This class serves a container for username/password pairs.

Since: 1.2

Constructor Summary
PasswordAuthentication(String username, char[] password)
Creates a new PasswordAuthentication object from the specified username and password.
Method Summary
char[]getPassword()
Returns the password associated with this object
StringgetUserName()
Returns the username associated with this object

Constructor Detail

PasswordAuthentication

public PasswordAuthentication(String username, char[] password)
Creates a new PasswordAuthentication object from the specified username and password.

Parameters: username The username for this object password The password for this object

Method Detail

getPassword

public char[] getPassword()
Returns the password associated with this object

Returns: The password

getUserName

public String getUserName()
Returns the username associated with this object

Returns: The username