Package ipsk.net
Class SimplePasswordAuthentication
- java.lang.Object
-
- java.net.Authenticator
-
- ipsk.net.SimplePasswordAuthentication
-
public class SimplePasswordAuthentication extends java.net.AuthenticatorStores and provides username and password for network authentication.- Author:
- K.Jaensch, klausj@phonetik.uni-muenchen.de
-
-
Constructor Summary
Constructors Constructor Description SimplePasswordAuthentication(java.lang.String username, char[] password)SimplePasswordAuthentication(java.lang.String username, java.lang.String password)Creates new password authentication.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetPassword()Gets current password.protected java.net.PasswordAuthenticationgetPasswordAuthentication()Gets password authentication.char[]getPasswordChars()java.lang.StringgetUsername()Gets current user name.voidsetPassword(java.lang.String string)Sets password.voidsetUsername(java.lang.String string)Sets user name.-
Methods inherited from class java.net.Authenticator
getDefault, getRequestingHost, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingScheme, getRequestingSite, getRequestingURL, getRequestorType, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthenticationInstance, setDefault
-
-
-
-
Constructor Detail
-
SimplePasswordAuthentication
public SimplePasswordAuthentication(java.lang.String username, java.lang.String password)Creates new password authentication.- Parameters:
username- the username for authenticationpassword- the password for authentication
-
SimplePasswordAuthentication
public SimplePasswordAuthentication(java.lang.String username, char[] password)
-
-
Method Detail
-
getPasswordAuthentication
protected java.net.PasswordAuthentication getPasswordAuthentication()
Gets password authentication.- Overrides:
getPasswordAuthenticationin classjava.net.Authenticator- Returns:
- PasswordAuthentication password authentication
-
getPassword
public java.lang.String getPassword()
Gets current password.- Returns:
- curent password
-
getPasswordChars
public char[] getPasswordChars()
-
getUsername
public java.lang.String getUsername()
Gets current user name.- Returns:
- user name
-
setPassword
public void setPassword(java.lang.String string)
Sets password.- Parameters:
string- password
-
setUsername
public void setUsername(java.lang.String string)
Sets user name.- Parameters:
string- user name
-
-