Class ClaimPath
java.lang.Object
org.keycloak.broker.oid4vp.mappers.ClaimPath
A path locating claims in the claims JSON of a presented credential, configured in dot notation
with optional array selectors:
address.locality selects a nested claim,
nationalities[] selects all array elements, nationalities[0] selects the first
element, and a literal dot in a claim name is escaped as \..
Field and all element steps correspond to the object key (string) and all elements (null)
kinds of a DCQL claims path pointer as defined by
OID4VP 1.0, Section 6.3. The pointer's array index kind is not supported beyond [0]:
the verifier removes undisclosed array elements from the presented payload, so positions from
the issued credential do not survive selective disclosure, and an index read against the
compacted array would silently select a different element than the one the position named at
issuance. [0] therefore means the first element of the presentation, which under
selective disclosure is the first disclosed element and not necessarily the first issued one.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ClaimPathParses the dot notation path, returningnullif it is not well formed.List<com.fasterxml.jackson.databind.JsonNode>select(com.fasterxml.jackson.databind.JsonNode claims) Selects the claims this path points to.steps()The parsed steps, for consumers that transform the path rather than resolve it.
-
Constructor Details
-
ClaimPath
-
-
Method Details
-
steps
The parsed steps, for consumers that transform the path rather than resolve it. -
parse
Parses the dot notation path, returningnullif it is not well formed. -
select
public List<com.fasterxml.jackson.databind.JsonNode> select(com.fasterxml.jackson.databind.JsonNode claims) Selects the claims this path points to. An all elements step fans out into every array element, so the result may hold several nodes. Null nodes and dead ends select nothing.
-