'@param serv_type: An indication of what kind of server authentication
is being attempted against.  For example, C{u"xmpp"}.
@type serv_type: C{unicode}
@param host: The authentication hostname.  Also known as the realm.
This is used as a scope to help select the right credentials.
@type host: C{unicode}
@param serv_name: An additional identifier for the server.
@type serv_name: C{unicode}
@param username: The authentication username to use to respond to a
challenge.
@type username: C{unicode}
@param username: The authentication password to use to respond to a
challenge.
@type password: C{unicode}'

def __init__(self, serv_type, host, serv_name, username, password):

    self.username = username
    self.password = password
    self.defaultRealm = host
    self.digest_uri = (u'%s/%s' % (serv_type, host))
    if (serv_name is not None):
        self.digest_uri += (u'/%s' % (serv_name,))
