Compaction with mandated context incompatible with OIDC
While experimenting in the JSON-LD Playground, I stumbled upon the following issue, which I could only solve by diverting from the mandated JSON-LD context.
Starting from the example Client ID Document in 5.1, when expanding with the context and then compacting the result again, the "redirect_uris": ["https://app.example/callback"] statement becomes:
"redirect_uris": {
"@none": [
"https://app.example/callback"
]
}
This is obviously not what we want, in order to be compatible with OIDC Dynamic Registration syntax. It is due to redirect_uris being configured as a JSON-LD ID Map in the context, as follows.
"redirect_uris": {
"@id": "oidc:redirect_uris",
"@type": "@id",
"@container": [
"@id",
"@set"
]
}
That data structure is meant for maps, both the key and the value of which are (named) nodes. A set of redirect URIs, however, is just a set of nodes, not a map. I therefore believe the @id annotation of @container should be removed, leaving just "@container": "@set", which results in the correct expansion.