DeviceProfileCallback

A callback implementation for collecting and processing device profile information during authentication flows.

This callback is used within the Ping Identity journey framework to gather comprehensive device metadata and location information based on server-side configuration. It provides a flexible, DSL-based approach for customizing the device profiling process while maintaining security and privacy compliance.

Key Features:

  • Automatic server configuration parsing for metadata and location collection flags

  • Extensible collector system for gathering specific device characteristics

  • DSL-based configuration for custom collection scenarios

  • Built-in error handling and logging capabilities

  • Seamless integration with Ping Identity authentication journeys

Usage Example:

// Basic collection with server configuration
val result = deviceProfileCallback.collect()

// Custom collection with specific collectors
val result = deviceProfileCallback.collect {
collectors {
add(PlatformCollector)
add(HardwareCollector())
add(LocationCollector())
}
logger = Logger.DEBUG
}

Server Configuration: The callback expects server-side configuration with the following properties:

  • metadata: Boolean flag indicating whether device metadata should be collected

  • location: Boolean flag indicating whether location data should be collected

  • message: Optional message containing instructions or context information

See also

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open lateinit override var journey: <Error class: unknown class>
Link copied to clipboard

Indicates whether location collection is enabled for this callback.

Link copied to clipboard

A message from the server providing context or instructions for device profile collection.

Link copied to clipboard

Indicates whether metadata collection is enabled for this callback.

Functions

Link copied to clipboard
suspend fun collect(block: DeviceProfileConfig.() -> Unit = { }): Result<JsonObject>

Collects comprehensive device profile information and submits it to the authentication server.

Link copied to clipboard
protected open override fun init(name: String, value: JsonElement)

Initializes callback properties based on server-provided configuration.