requesting sub fields of structured claims

Issue #1238 resolved
Torsten Lodderstedt created an issue

We run into the problem that a client cannot express expectations regarding sub claims of structured claims, like address.

For example, some clients want street_address, locality, postal_code and country all to be present in the result in order to meet the needs of their use cases. However, some IDPs cannot provide the country. It would be great if we could utilize the new if_unavailable field in such a case.

For some, the zip_code might be sufficient and is privacy preserving. The way structured claims are requested today does not support this approach.

Bottomline: I see the need to

  • explicitly request sub field in structured claims (like we do it for verification sub fields) and
  • be able to express conditions, like if_unavailable.

Examples for requesting sub claims:

{
    "userinfo": {
        "verified_claims": {
            "verification": {
                "trust_framework": null
            },
            "claims": {
                "address": {
                    "street_address": null,
                    "locality": null,
                    "postal_code": null,
                    "country": null
                }
            }
        }
    }
}
{
    "userinfo": {
        "verified_claims": {
            "verification": {
                "trust_framework": null
            },
            "claims": {
                "address": {
                    "postal_code": null
                }
            }
        }
    }
}

Example for using “if_unavailable”

{
    "userinfo": {
        "verified_claims": {
            "verification": {
                "trust_framework": null
            },
            "claims": {
                "address": {
                    "street_address": {
                        "if_unavailable": "abort"
                    },
                    "locality": {
                        "if_unavailable": "abort"
                    },
                    "postal_code": {
                        "if_unavailable": "abort"
                    },
                    "country": {
                        "if_unavailable": "abort"
                    }
                }
            }
        }
    }
}

Comments (6)

  1. Log in to comment