Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
internal lateinit var biometricInterface: BiometricHandler
Link copied to clipboard
internal lateinit var cryptoKey: CryptoKey
Link copied to clipboard
internal var isApi30OrAbove: Boolean

Functions

Link copied to clipboard
open suspend override fun authenticate(context: Context): DeviceBindingStatus

Display biometric prompt for authentication type

abstract fun authenticate(authenticationCallback: BiometricPrompt.AuthenticationCallback, privateKey: PrivateKey)

Launch the Biometric Prompt.

Link copied to clipboard
open override fun deleteKeys(context: Context)
Link copied to clipboard
abstract suspend fun generateKeys(context: Context, attestation: Attestation): KeyPair

generate the public and private KeyPair with Challenge

Link copied to clipboard
open fun getAlgorithm(): String

The JWS algorithm (alg) parameter. Header Parameter identifies the cryptographic algorithm used to secure the JWS.

Link copied to clipboard
private fun getCertificateChain(userId: String): List<Base64>
Link copied to clipboard
open fun getIssueTime(): Date

Get the token signed issue time.

Link copied to clipboard

Get the token not before time.

Link copied to clipboard
open fun isSupported(context: Context, attestation: Attestation = Attestation.None): Boolean

check if supported device binding

Link copied to clipboard
open fun prompt(prompt: Prompt)

Set the Authentication Prompt

Link copied to clipboard
fun setBiometricHandler(biometricHandler: BiometricHandler)
Link copied to clipboard
override fun setKey(cryptoKey: CryptoKey)
Link copied to clipboard
open fun sign(context: Context, userKey: UserKey, privateKey: PrivateKey, signature: Signature?, challenge: String, expiration: Date, customClaims: Map<String, Any> = emptyMap()): String
open fun sign(context: Context, keyPair: KeyPair, signature: Signature?, kid: String, userId: String, challenge: String, expiration: Date, attestation: Attestation = Attestation.None): String

sign the challenge sent from the server and generate signed JWT

Link copied to clipboard
Link copied to clipboard
open fun validateCustomClaims(customClaims: Map<String, Any>): Boolean

Validate custom claims