DeviceBindingConfig
Configuration class for customizing device binding operations.
This DSL-enabled configuration class allows fine-grained control over various aspects of the device binding process, including authentication methods, storage configuration, JWT signing parameters, and user interface behavior.
The configuration supports:
Multiple authentication types (biometric, PIN, none)
Customizable storage backends for user key metadata
JWT signing algorithm and timing configuration
Device identification and naming
Custom claims for verification
User key selection strategies
Example usage:
deviceBindingCallback.bind {
deviceName = "My Custom Device"
signingAlgorithm = "RS256"
userKeyStorage {
fileName = "my_keys.json"
}
biometricAuthenticatorConfig {
promptInfo = {
setTitle("Authenticate for Device Binding")
}
}
}See also
Properties
Factory function for creating device authenticators based on authentication type.
The device identifier used to generate unique device IDs for binding. Defaults to DefaultDeviceIdentifier which uses Android device properties.
The human-readable name for the device that will be displayed in user interfaces. Defaults to the device model (Build.MODEL).
Function that calculates the JWT expiration time based on timeout seconds. Takes the timeout in seconds and returns an Instant representing when the JWT expires. Defaults to current time plus the timeout in seconds.
Function that provides the "nbf" (not before) time for JWT validation. Defaults to the current system time, meaning the JWT is valid immediately.
The cryptographic algorithm used for signing JWTs during device binding. Must be a valid JWS algorithm identifier. Defaults to "RS512". Common values: "RS256", "RS384", "RS512"
Functions
Configures the application PIN authenticator settings.
Configures the biometric authenticator settings.
Configures a custom user key selection strategy.
Configures the storage backend for user key metadata.