# BiometricPrompt.AuthenticationResult

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# AuthenticationResult

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.AuthenticationResult "View this page in Java")  

```
open class AuthenticationResult
```

|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                                       ||
| ↳ | [android.hardware.biometrics.BiometricPrompt.AuthenticationResult](https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricPrompt.AuthenticationResult#) |

Container for callback data from[authenticate(android.os.CancellationSignal,java.util.concurrent.Executor,android.hardware.biometrics.BiometricPrompt.AuthenticationCallback)](https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricPrompt#authenticate(android.os.CancellationSignal,%20java.util.concurrent.Executor,%20android.hardware.biometrics.BiometricPrompt.AuthenticationCallback))and[authenticate(android.hardware.biometrics.BiometricPrompt.CryptoObject,android.os.CancellationSignal,java.util.concurrent.Executor,android.hardware.biometrics.BiometricPrompt.AuthenticationCallback)](https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricPrompt#authenticate(android.hardware.biometrics.BiometricPrompt.CryptoObject,%20android.os.CancellationSignal,%20java.util.concurrent.Executor,%20android.hardware.biometrics.BiometricPrompt.AuthenticationCallback)).

## Summary

|                                                                                                                                                                                                                       Public methods                                                                                                                                                                                                                        ||
|----------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                               | [getAuthenticationType](https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricPrompt.AuthenticationResult#getAuthenticationType())`()` Provides the type of authentication (e.g. device credential or biometric) that was requested from and successfully provided by the user. |
| open[BiometricPrompt.CryptoObject](https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricPrompt.CryptoObject)! | [getCryptoObject](https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricPrompt.AuthenticationResult#getCryptoObject())`()` Provides the crypto object associated with this transaction.                                                                                         |

## Public methods

### getAuthenticationType

Added in[API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun getAuthenticationType(): Int
```

Provides the type of authentication (e.g. device credential or biometric) that was requested from and successfully provided by the user.

|                                                                                                                                                                                                                                                                                                               Return                                                                                                                                                                                                                                                                                                               ||
|----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | An integer value representing the authentication method used. Value is[android.hardware.biometrics.BiometricPrompt#AUTHENTICATION_RESULT_TYPE_DEVICE_CREDENTIAL](https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricPrompt#AUTHENTICATION_RESULT_TYPE_DEVICE_CREDENTIAL:kotlin.Int), or[android.hardware.biometrics.BiometricPrompt#AUTHENTICATION_RESULT_TYPE_BIOMETRIC](https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricPrompt#AUTHENTICATION_RESULT_TYPE_BIOMETRIC:kotlin.Int) |

### getCryptoObject

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun getCryptoObject(): BiometricPrompt.CryptoObject!
```

Provides the crypto object associated with this transaction.

|                                                                                                                                                                                                                                                                                                                                          Return                                                                                                                                                                                                                                                                                                                                           ||
|------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [BiometricPrompt.CryptoObject](https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricPrompt.CryptoObject)! | The crypto object provided to[authenticate(android.hardware.biometrics.BiometricPrompt.CryptoObject,android.os.CancellationSignal,java.util.concurrent.Executor,android.hardware.biometrics.BiometricPrompt.AuthenticationCallback)](https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricPrompt#authenticate(android.hardware.biometrics.BiometricPrompt.CryptoObject,%20android.os.CancellationSignal,%20java.util.concurrent.Executor,%20android.hardware.biometrics.BiometricPrompt.AuthenticationCallback)) |