def __init__(self, scheme: str = 'Basic', realm: Optional[str] = None, description: Optional[str] = None) -> None: """Initialize a `HTTPBasicAuth` object. Arguments: scheme: The authentication scheme used in the `WWW-Authenticate` header. Defaults to `'Basic'`. realm: The realm used in the `WWW-Authenticate` header to indicate a scope of protection, defaults to use `'Authentication Required'`. description: The description of the security scheme. """ super(HTTPBasicAuth, self).__init__(description=description) BaseHTTPBasicAuth.__init__(self, scheme=scheme, realm=realm) self.error_handler(handle_auth_error)
def __init__(self): HTTPBasicAuth.__init__(self) self.verify_password(self._verify_password) self.credentials = {}