diff --git a/src/oic/oauth2/message.py b/src/oic/oauth2/message.py index 33c89942..36bf9a1c 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