Parsed representation of the X-DF-Native-Capabilities request header.
When a Dynamic Flow client has native subflow handlers registered, it advertises them to the server on every request via the X-DF-Native-Capabilities header. Backend services can inspect this header to decide whether to offer a native subflow experience or fall back to a standard Dynamic Flow step.
The header value is a semicolon-delimited list of capability entries. Each capability may optionally include a parenthesised, comma-separated list of key:value comments carrying additional metadata:
X-DF-Native-Capabilities: facetec(sdk-version:1.2.3);biometric-authentication(faceid:true,touchid:true)
Pass the raw header value directly to the constructor:
// Kotlin
val capabilities = NativeCapabilities(request.getHeader("X-DF-Native-Capabilities"))
// Java
NativeCapabilities capabilities = new NativeCapabilities(request.getHeader("X-DF-Native-Capabilities"));
Use get to check whether the client supports a given capability:
if (capabilities.get("biometric-authentication") != null) {
// return a step with a native SubflowBehavior
} else {
// return an alternative step without native SubflowBehavior
}
Use get to retrieve a capability, then NativeCapability.getComment to read a specific comment value:
// Kotlin
val sdkVersion = capabilities.get("facetec")?.getComment("sdk-version")
// Java
NativeCapabilities.NativeCapability facetec = capabilities.get("facetec");
String sdkVersion = facetec != null ? facetec.getComment("sdk-version") : null;
DF clients percent-encode any delimiter characters (;, (, ), ,, :) that appear in capability IDs, comment keys, or comment values before writing the header. This class decodes them after parsing, so the strings returned by get and getComment are always the original, unencoded values.
Capability entries that do not conform to the expected format are silently skipped. If the same capability ID or comment key appears more than once, the last occurrence wins.
| Method | Returns | Description |
|---|---|---|
get(id: String) | NativeCapabilities.NativeCapability or null | Returns the Native Capability with the given id, or null if the client did not advertise it. |
Represents a single native capability advertised by the client.
Instances are created by [NativeCapabilities.get] and should not be constructed directly.
| Property | Type | Required | Description |
|---|---|---|---|
id | String | Yes | The capability identifier as declared in the X-DF-Native-Capabilities header segment. |
| Method | Returns | Description |
|---|---|---|
getComment(key: String) | String or null | Returns the value of the comment with the given key, or null if not present. |