Merge "Pass oidc client id in the body if no client secret provided"

This commit is contained in:
Zuul 2024-09-06 19:25:15 +00:00 committed by Gerrit Code Review
commit f772f6992a

View File

@ -200,7 +200,11 @@ class _OidcBase(federation.FederationBaseAuth, metaclass=abc.ABCMeta):
'password': self.password, 'scope': self.scope}
:type payload: dict
"""
client_auth = (self.client_id, self.client_secret)
if self.client_secret:
client_auth = (self.client_id, self.client_secret)
else:
client_auth = None
payload.setdefault('client_id', self.client_id)
access_token_endpoint = self._get_access_token_endpoint(session)
if _logger.isEnabledFor(logging.DEBUG):