core2-jvm (latest)
core2-jvm (latest)core-jvm
  • Home
  • Features
  • Spec
  • Guides
  • Sandbox
  • Step Studio
  • Step
    • Action
    • External
    • Help
    • Link Handler
    • Navigation
    • Persist Async
    • Polling
    • Refresh On Change
    • Schema On Change
    • Step Error
    • Suggestions
    • Summary
    • Toolbar
    • Upload
    • Validate Async
    • Schema
    • All Of Schema
    • Array Schema
    • Blob Schema
    • Boolean Schema
    • Const Schema
    • Integer Schema
    • Number Schema
    • Object Schema
    • One Of Schema
    • String Schema
    • Layout
    • Alert Layout
    • Box Layout
    • Button Layout
    • Columns Layout
    • Decision Layout
    • Divider Layout
    • Form Layout
    • Heading Layout
    • Image Layout
    • Instructions Layout
    • List Layout
    • Loading Indicator Layout
    • Markdown Layout
    • Media Layout
    • Modal Layout
    • Paragraph Layout
    • Progress Layout
    • Review Layout
    • Search Layout
    • Section Layout
    • Status List Layout
    • Tabs Layout
    • Upsell Layout
    • Behavior
    • Action Behavior
    • Copy Behavior
    • Dismiss Behavior
    • Link Behavior
    • Modal Behavior
    • Refresh Behavior
    • Subflow Behavior
    • Subflow
    • Dynamic Launch Config
    • Launch Config
    • Modal Presentation
    • Native Launch Config
    • Presentation
    • Push Presentation
    • Action Response Body
    • Error Response Body
    • Flow Response
    • Modal Response Body
    • No Op Response Body
    • Search Initial Layout Config
    • Search Initial Results Config
    • Search Initial State
    • Search Layout Response Body
    • Search Response
    • Search Response Body
    • Search Result
    • Search Results Response Body
    • Subflow Response Body
    • Additional Info
    • Align
    • Autocapitalization Type
    • Autocomplete Token
    • Context
    • Icon
    • Image
    • Inline Alert
    • Media
    • Native Capabilities
    • Request
    • Size
    • Supporting Values
    • Control
    • Tag

Native Capabilities

Parsed representation of the X-DF-Native-Capabilities request header.

Overview

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.

Header format

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)

Instantiation

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"));

Checking support

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
}

Reading comments

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;

Percent-decoding

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.

Malformed input

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.

Methods

MethodReturnsDescription
get(id: String)NativeCapabilities.NativeCapability or nullReturns the Native Capability with the given id, or null if the client did not advertise it.

Related Types

Native Capability

Represents a single native capability advertised by the client.

Instances are created by [NativeCapabilities.get] and should not be constructed directly.

Properties

PropertyTypeRequiredDescription
idStringYesThe capability identifier as declared in the X-DF-Native-Capabilities header segment.

Methods

MethodReturnsDescription
getComment(key: String)String or nullReturns the value of the comment with the given key, or null if not present.