org.objectweb.jonas.management.monitoring
Class AuthenticationInformation
java.lang.Object
org.objectweb.jonas.management.monitoring.AuthenticationInformation
public final class AuthenticationInformation
- extends java.lang.Object
Stores the authentication information for a server.
- Author:
- S. Ali Tokmen
Constructor Summary |
AuthenticationInformation(java.lang.String username,
java.lang.String password)
Saves the authentication information. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AuthenticationInformation
public AuthenticationInformation(java.lang.String username,
java.lang.String password)
throws java.io.UnsupportedEncodingException
- Saves the authentication information.
- Parameters:
username
- user namepassword
- password, may be encoded in the following formats:
- None, don't prefix at all
- Encoded using base64, prefix with {base64}
- Throws:
java.io.UnsupportedEncodingException
- If password is not base64 encoded UTF-8
getUsername
public java.lang.String getUsername()
- Returns:
- the username
getPassword
public java.lang.String getPassword()
- Returns:
- the password, original format
decodePassword
public java.lang.String decodePassword()
throws java.io.UnsupportedEncodingException
- Returns:
- the password, decoded format
- Throws:
java.io.UnsupportedEncodingException
- Shouldn't be thrown since
constructor already checks for it.
encodePassword
public static java.lang.String encodePassword(java.lang.String password)
throws java.io.UnsupportedEncodingException
- Encode a password.
- Parameters:
password
- Password to encode.
- Returns:
- Encoded password.
- Throws:
java.io.UnsupportedEncodingException
- If password is not UTF-8 encoded.