def _get_http_auth(username: str, password: str, auth_type: str) -> AuthBase:
if auth_type == 'basic':
return HTTPBasicAuth(username, password)
if auth_type == 'digest':
return HTTPDigestAuth(username, password)
raise RetsClientError('unknown auth type %s' % auth_type)
评论列表
文章目录