org.cafesip.sipunit
Class Credential

java.lang.Object
  extended by org.cafesip.sipunit.Credential

public class Credential
extends java.lang.Object

This class holds authentication information required for accessing a realm. This information is used to form an authorization header when a sent request is challenged by the network element owning the realm.


Constructor Summary
Credential()
          A no-arg constructor for this class.
Credential(java.lang.String realm, java.lang.String user, java.lang.String password)
          A constructor for this class.
 
Method Summary
 java.lang.String getPassword()
          This method returns the password.
 java.lang.String getRealm()
          This method returns the realm.
 java.lang.String getUser()
          This method returns the user.
 void setPassword(java.lang.String password)
          This method sets the password to use when authentication is required.
 void setRealm(java.lang.String realm)
          This method sets the realm associated with the user name and password.
 void setUser(java.lang.String user)
          This method sets the user name to use when authentication is required.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Credential

public Credential(java.lang.String realm,
                  java.lang.String user,
                  java.lang.String password)
A constructor for this class.

Parameters:
realm - the realm to which the user, password apply
user - the user name to use when authenticating
password - the password to use when authenticating

Credential

public Credential()
A no-arg constructor for this class.

Method Detail

getPassword

public java.lang.String getPassword()
This method returns the password.

Returns:
the password string.

setPassword

public void setPassword(java.lang.String password)
This method sets the password to use when authentication is required.

Parameters:
password - The password value to set.

getRealm

public java.lang.String getRealm()
This method returns the realm.

Returns:
the realm string.

setRealm

public void setRealm(java.lang.String realm)
This method sets the realm associated with the user name and password.

Parameters:
realm - The realm value to set.

getUser

public java.lang.String getUser()
This method returns the user.

Returns:
the user string.

setUser

public void setUser(java.lang.String user)
This method sets the user name to use when authentication is required.

Parameters:
user - The user value to set.


http://www.cafesip.org