From 091a46057bddc2392ccc1dd0099554448055a34f Mon Sep 17 00:00:00 2001 From: Luis Felipe Dominguez Vega Date: Mon, 19 Jul 2021 14:46:35 -0400 Subject: [PATCH] Add compatibility with Apple ID oauth messages --- src/oic/oauth2/message.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/oic/oauth2/message.py b/src/oic/oauth2/message.py index 33c89942e..36bf9a1c6 100644 --- a/src/oic/oauth2/message.py +++ b/src/oic/oauth2/message.py @@ -383,9 +383,14 @@ def _add_value(self, skey, vtyp, key, val, _deser, null_allowed): else: return elif vtyp is bool: - raise ParameterError( - '"{}", wrong type of value for "{}"'.format(val, skey) - ) + if val == "true": + self._dict[skey] = True + elif val == "false": + self._dict[skey] = False + else: + raise ParameterError( + '"{}", wrong type of value for "{}"'.format(val, skey) + ) if isinstance(val, str): self._dict[skey] = val