def METHOD_NAME(self, user=None, passwd=None):
    """Authenticate with service"""
    if user is None or passwd is None:
        self.error_msg = {"error": "Username and/or password not provided."}
        return
    login_url = f"{self.base_url}/security/user/authenticate"
    basic_auth = f"{user}:{passwd}".encode()
    headers = {'Authorization': f'Basic {b64encode(basic_auth).decode()}'}
    token = f'Bearer {self.get_response(login_url, headers)["data"]["token"]}'
    self.auth_dict = {"token": token}
    self.is_authenticated = True