Require 'id_token' only if 'openid' scope both requested and granted
It turns out that some authorization servers may grant openid scope
when none was requested. If the server does not also provide an
id_token, Qt OAuth2 implementation interprets this as an RFC violation.
However, strictly speaking, this is allowed by RFC.
If the client has not *requested* for openid scope, the behaviour is
not governed by the OIDC specification. It is thus allowed for the
authorization server to grant unsolicited 'openid' scope, with or
without 'id_token', and Qt implementation must not raise an error.
Fixes: QTBUG-145561
Pick-to: 6.11
Change-Id: I4c83d00f98a33b54b144402d74901e90eb02db16
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Andreas Beckermann <beckermann@monument-software.de>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>