no.feide.moria.directory
Class Credentials

java.lang.Object
  extended by no.feide.moria.directory.Credentials

public class Credentials
extends java.lang.Object

Represents a set of user credentials, that is, a username/password pair. Used for Moria authentication methods, and may be expanded to support other types of credentials in a future version

Note that this is a subset of the functionality offered by the Moria 1 Credentials class.


Field Summary
private  java.lang.String password
          Internal representation of the user's password.
private  java.lang.String username
          Internal representation of the username.
 
Constructor Summary
Credentials(java.lang.String username, java.lang.String password)
          Constructor.
 
Method Summary
 java.lang.String getPassword()
          Retrieves the password part of the credentials.
 java.lang.String getUsername()
          Retrieves the username part of the credentials.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

username

private final java.lang.String username
Internal representation of the username.


password

private final java.lang.String password
Internal representation of the user's password.

Constructor Detail

Credentials

public Credentials(java.lang.String username,
                   java.lang.String password)
Constructor. Creates a new set of credentials consisting of a username/password pair.

Parameters:
username - The username. May not be null or an empty string.
password - The user's password. May not be null or an empty string.
Throws:
java.lang.IllegalArgumentException - If username or password is null or an empty string.
Method Detail

getUsername

public final java.lang.String getUsername()
Retrieves the username part of the credentials.

Returns:
A newly allocated String containing the username.

getPassword

public final java.lang.String getPassword()
Retrieves the password part of the credentials.

Returns:
A newly allocated String containing the password.


Copyright © 2001-2006 UNINETT FAS. All Rights Reserved.