According the python documents, the argument for .strip method is "The chars argument is not a prefix or suffix; rather, all combinations of its values are stripped" in which it results to delete any chars of s, h, a, 2, 5, 6 after the "sha256~" prefix.
The fix should not be that complicated. As of python 3.9+, the removeprefix method has been added for string. However, I suggest to simply trim based on the length of the prefix.
From time to time, I was receiving "Couldn't delete user oauth access token...". After checking the source code, the source of the problem has been found in https://github.com/openshift/community.okd/blob/adfb5ee140ac39b7ad46e330779c16f5665d1c02/plugins/modules/openshift_auth.py#L227
According the python documents, the argument for .strip method is "The chars argument is not a prefix or suffix; rather, all combinations of its values are stripped" in which it results to delete any chars of s, h, a, 2, 5, 6 after the "sha256~" prefix.
For example:
The fix should not be that complicated. As of python 3.9+, the
removeprefix
method has been added for string. However, I suggest to simply trim based on the length of the prefix.