# AuthenticationResult.Success

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.Success) Added in [1.4.0-beta01](https://developer.android.com/jetpack/androidx/releases/biometric#1.4.0-beta01)

*** ** * ** ***


```
class AuthenticationResult.Success : AuthenticationResult
```

<br />

*** ** * ** ***

A result when the user has successfully authenticated.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/biometric/BiometricPrompt.AuthenticationResultType` |   |

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Success#Success(androidx.biometric.BiometricPrompt.CryptoObject,kotlin.Int)(crypto: https://developer.android.com/reference/kotlin/androidx/biometric/BiometricPrompt.CryptoObject?, authType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |

| ### Public functions |
|---|---|
| `open https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Success` | `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Success#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 properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Success#authType()` An integer representing the type of authentication(e.g. device credential or biometric) that was requested from and successfully provided by the user. |
| `https://developer.android.com/reference/kotlin/androidx/biometric/BiometricPrompt.CryptoObject?` | `https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult.Success#crypto()` The `https://developer.android.com/reference/kotlin/androidx/biometric/BiometricPrompt.CryptoObject` associated with this transaction. |

### Inherited functions

From [androidx.biometric.AuthenticationResult](https://developer.android.com/reference/kotlin/androidx/biometric/AuthenticationResult) `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`.

## Public constructors

### Success

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

```
Success(crypto: BiometricPrompt.CryptoObject?, authType: Int)
```

## Public functions

### success

```
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.

## Public properties

### authType

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

```
val authType: Int
```

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

### crypto

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

```
val crypto: BiometricPrompt.CryptoObject?
```

The `https://developer.android.com/reference/kotlin/androidx/biometric/BiometricPrompt.CryptoObject` associated with this transaction.