# AuthenticationResult

Artifact: [androidx.biometric:biometric](https://developer.android.com/jetpack/androidx/releases/biometric) [View Source](https://cs.android.com/search?q=file:androidx/biometric/AuthenticationResult.kt+class:androidx.biometric.AuthenticationResult) Added in [1.4.0-beta01](https://developer.android.com/jetpack/androidx/releases/biometric#1.4.0-beta01)

*** ** * ** ***


```
sealed interface AuthenticationResult
```

<br />

Known direct subclasses [AuthenticationResult.CustomFallbackSelected](https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.CustomFallbackSelected), [AuthenticationResult.Error](https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Error), [AuthenticationResult.Success](https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Success)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.CustomFallbackSelected` | The prompt was dismissed because the user clicked a custom fallback option. |
| `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Error` | A result when an error has been encountered and authentication has stopped. |
| `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Success` | A result when the user has successfully authenticated. |

*** ** * ** ***

Types of the terminal result of the authentication.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.CustomFallbackSelected : https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult` The prompt was dismissed because the user clicked a custom fallback option. |
| `class https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Error : https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult` A result when an error has been encountered and authentication has stopped. |
| `class https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Success : https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult` A result when the user has successfully authenticated. |

| ### Public functions |
|---|---|
| `open https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.CustomFallbackSelected?` | `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult#customFallbackSelected()()` Returns a `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.CustomFallbackSelected` only if it's a `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.CustomFallbackSelected`, returns null otherwise. |
| `open https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Error?` | `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult#error()()` Returns a `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Error` only if it's a `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Error`, returns null otherwise. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult#isCustomFallbackSelected()()` Whether this `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult` is a `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.CustomFallbackSelected`. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult#isError()()` Whether this `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult` is an `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Error`. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult#isSuccess()()` Whether this `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult` is a `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Success`. |
| `open https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Success?` | `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult#success()()` Returns a `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Success` only if it's a `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Success`, returns null otherwise. |

## Public functions

### customFallbackSelected

Added in [1.4.0-beta01](https://developer.android.com/jetpack/androidx/releases/biometric#1.4.0-beta01)

```
open fun customFallbackSelected(): AuthenticationResult.CustomFallbackSelected?
```

Returns a `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.CustomFallbackSelected` only if it's a `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.CustomFallbackSelected`, returns null otherwise.

### error

Added in [1.4.0-beta01](https://developer.android.com/jetpack/androidx/releases/biometric#1.4.0-beta01)

```
open fun error(): AuthenticationResult.Error?
```

Returns a `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Error` only if it's a `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Error`, returns null otherwise.

### isCustomFallbackSelected

Added in [1.4.0-beta01](https://developer.android.com/jetpack/androidx/releases/biometric#1.4.0-beta01)

```
open fun isCustomFallbackSelected(): Boolean
```

Whether this `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult` is a `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.CustomFallbackSelected`.

### isError

Added in [1.4.0-beta01](https://developer.android.com/jetpack/androidx/releases/biometric#1.4.0-beta01)

```
open fun isError(): Boolean
```

Whether this `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult` is an `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Error`.

### isSuccess

Added in [1.4.0-beta01](https://developer.android.com/jetpack/androidx/releases/biometric#1.4.0-beta01)

```
open fun isSuccess(): Boolean
```

Whether this `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult` is a `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Success`.

### success

Added in [1.4.0-beta01](https://developer.android.com/jetpack/androidx/releases/biometric#1.4.0-beta01)

```
open fun success(): AuthenticationResult.Success?
```

Returns a `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Success` only if it's a `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Success`, returns null otherwise.