def set_user_password(self, user_name, password):
"""
Create the DIGEST authentication handler, which handles the
Cradlepoint's challenge/response to Router API (CURL-like) calls.
:param str user_name:
:param str password:
:return:
"""
from requests.auth import HTTPDigestAuth
assert user_name is not None and isinstance(user_name, str)
assert password is not None and isinstance(password, str)
self.digest = HTTPDigestAuth(user_name, password)
# if self._logger is not None:
# self._logger.debug("CSClient() set user={}, pass=*****".format(
# user_name))
return
评论列表
文章目录