+ def check_credentials(self):
+ endpoint = "{}/checkCredentials".format(self.__wim_url)
+ auth = (self.__user, self.__passwd)
+
+ try:
+ response = requests.get(endpoint, auth=auth)
+ http_code = response.status_code
+ except requests.exceptions.RequestException as e:
+ self.__exception(e.message, http_code=503)
+
+ if http_code != 200:
+ self.__exception(WimError.UNAUTHORIZED, http_code=http_code)
+ self.logger.info("Credentials checked")
+