commit ffa3a8f63728236e3f27320adc8b3b70358d2fe5
Author: Andy Ning <email address hidden>
Date: Thu Jun 16 09:31:30 2022 -0400
Fix oidc-auth cli for python3
The response to oidc token request is bytes type. This is
fine with python2 as there is no distinguish between bytes
and string. But in python3, bytes and string are different,
causing some string operations (such as split(response, "\n"))
to fail. This is fixed by converting the bytes into string if
the script is run in python3.
Test Plan for Debian and CentOS:
PASS: python3-oidcauthtools package build.
PASS: With oidc-auth-apps applied and configured, run oidc-auth
cli to get a token.
Closes-Bug: 1978963
Signed-off-by: Andy Ning <email address hidden>
Change-Id: I09e2ddab1b0ab44b0dd5aefebbe25624b3b67300
Reviewed: https:/ /review. opendev. org/c/starlingx /oidc-auth- armada- app/+/846174 /opendev. org/starlingx/ oidc-auth- armada- app/commit/ ffa3a8f63728236 e3f27320adc8b3b 70358d2fe5
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit ffa3a8f63728236 e3f27320adc8b3b 70358d2fe5
Author: Andy Ning <email address hidden>
Date: Thu Jun 16 09:31:30 2022 -0400
Fix oidc-auth cli for python3
The response to oidc token request is bytes type. This is
fine with python2 as there is no distinguish between bytes
and string. But in python3, bytes and string are different,
causing some string operations (such as split(response, "\n"))
to fail. This is fixed by converting the bytes into string if
the script is run in python3.
Test Plan for Debian and CentOS: oidcauthtools package build.
PASS: python3-
PASS: With oidc-auth-apps applied and configured, run oidc-auth
cli to get a token.
Closes-Bug: 1978963 4b0dd5aefebbe25 624b3b67300
Signed-off-by: Andy Ning <email address hidden>
Change-Id: I09e2ddab1b0ab4