Description
Summary
@jgrandja
We have a Problem retrieving the Userinfo data for our custom Identity Provider that implements OpenID Connect.
I stumbled accross #4451 and can totally understand why you made the retrieval of the userinfo optional.
But as far as I understand the specification, one can define custom claims https://openid.net/specs/openid-connect-core-1_0.html#AdditionalClaims
And also requesting of claims is optional. A IDP can decide what claims to send when nothing is requested.
https://openid.net/specs/openid-connect-core-1_0.html#ClaimsParameter
Support for the claims parameter is OPTIONAL. Should an OP not support this parameter and an RP uses it, the OP SHOULD return a set of Claims to the RP that it believes would be useful to the RP and the End-User using whatever heuristics it believes are appropriate. The claims_parameter_supported Discovery result indicates whether the OP supports this parameter.
Actual Behavior
With the implementation introduced in the issue linked above, it is not possible to retrieve the userinfo without specifying one of the default scopes.
But as said above, requesting a claim is totally optional. And the scope values are not the only way of requesting a claim.
But maybe my interpretation of the Spec is wrong and everything is totally fine :)
Expected Behavior
It should be possible to retrieve the userinfo without specifying a default scope.
Maybe some configurable "UserInfoRetrievalMatcher" interface. The default implementation is the current implementation, but applications can provide a custom implementation to decide if the userinfo should be loaded or not.