From 96c1a30df5d8abc0343c146f7f8bca8ca74c95b2 Mon Sep 17 00:00:00 2001 From: sean-freeman <1815807+sean-freeman@users.noreply.github.com> Date: Thu, 14 Sep 2023 14:50:05 +0100 Subject: [PATCH] fix: catch and fail for too old password --- plugins/module_utils/sap_id_sso.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/module_utils/sap_id_sso.py b/plugins/module_utils/sap_id_sso.py index b0b03e5..577ccc7 100644 --- a/plugins/module_utils/sap_id_sso.py +++ b/plugins/module_utils/sap_id_sso.py @@ -59,6 +59,8 @@ def sap_sso_login(username, password): if 'j_username' in meta: meta['j_username'] = username meta['j_password'] = password + if 'changePassword' in endpoint: + raise ValueError('SAP ID Service has requested `Change Your Password`, possibly the password is too old. Please reset manually and try again.') if 'authn' in endpoint: support_endpoint, support_meta = _get_sso_endpoint_meta(endpoint,