DeviceSigningVerifierCallback

Callback to collect the device signing information

Constructors

Link copied to clipboard
constructor(jsonObject: JSONObject, index: Int)
constructor()

Properties

Link copied to clipboard
protected var _id: Int
Link copied to clipboard
lateinit var challenge: String

The challenge received from server

Link copied to clipboard
protected var content: String
Link copied to clipboard
lateinit var description: String

The description to be displayed in biometric prompt

Link copied to clipboard
lateinit var subtitle: String

The subtitle to be displayed in biometric prompt

Link copied to clipboard
var timeout: Int?

The timeout to be to expire the biometric authentication

Link copied to clipboard
lateinit var title: String

The title to be displayed in biometric prompt

Link copied to clipboard

The optional userId

Functions

Link copied to clipboard
protected open suspend fun authenticate(context: Context, userKey: UserKey, deviceAuthenticator: DeviceAuthenticator, customClaims: Map<String, Any> = emptyMap(), prompt: Prompt? = null)

Helper method to execute signing, show biometric prompt.

Link copied to clipboard
internal suspend fun execute(context: Context, userKeyService: UserKeyService = UserDeviceKeyService(context), userKeySelector: UserKeySelector = DefaultUserKeySelector(), deviceAuthenticator: (type: DeviceBindingAuthenticationType) -> DeviceAuthenticator, customClaims: Map<String, Any> = emptyMap(), prompt: Prompt? = null)
Link copied to clipboard
open override fun get_id(): Int

Return the unique id for this callback. The id only available with Callback that using PageCallback

Link copied to clipboard
open override fun getContent(): String

Return the raw content of the Callback.

Link copied to clipboard
protected open fun getContentAsJson(): JSONObject
Link copied to clipboard

Create the interface for the Authentication type(Biometric, Biometric_Fallback, none)

Link copied to clipboard
open fun getDuration(timeout: Int?): Duration

Convert timeout in seconds to Duration

Link copied to clipboard
open fun getExpiration(timeout: Int?): Date

Get Expiration date for the signed token, claim "exp" will be set to the JWS.

Link copied to clipboard
private open fun getInput(content: JSONObject, index: Int): JSONObject
Link copied to clipboard
open fun getInputValue(): Any

Get the first value for input

open fun getInputValue(index: Int): Any

Get the value for input

Link copied to clipboard
protected open fun getName(jsonObject: JSONObject): String
Link copied to clipboard
open override fun getType(): String

Return the type of the Callback, the type name should align with the Callback type returned from AM

Link copied to clipboard

Handle all the errors for the device binding.

Link copied to clipboard
protected open override fun setAttribute(name: String, value: Any)
Link copied to clipboard
open override fun setClientError(clientError: String?)

Input the Client Error to the server

Link copied to clipboard
protected open fun setContent(jsonObject: JSONObject)

Sets the value of the Callback

Link copied to clipboard
fun setJws(value: String?)

Input the JWS key to the server

Link copied to clipboard
protected open fun setValue(value: Any)

Set the first value for input

protected open fun setValue(value: Any, index: Int)

Set the value for the input.

Link copied to clipboard
open suspend fun sign(context: Context, customClaims: Map<String, Any> = emptyMap(), prompt: Prompt? = null, userKeySelector: UserKeySelector = DefaultUserKeySelector(), deviceAuthenticator: (type: DeviceBindingAuthenticationType) -> DeviceAuthenticator = deviceAuthenticatorIdentifier)
open fun sign(context: Context, customClaims: Map<String, Any> = emptyMap(), userKeySelector: UserKeySelector = DefaultUserKeySelector(), deviceAuthenticator: (type: DeviceBindingAuthenticationType) -> DeviceAuthenticator = deviceAuthenticatorIdentifier, listener: FRListener<Void?>, prompt: Prompt? = null)

Sign the challenge with bounded device keys.