# 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)

*** ** * ** ***


```
public final class AuthenticationResult.Success implements AuthenticationResult
```

<br />

*** ** * ** ***

A result when the user has successfully authenticated.

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

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/biometric/AuthenticationResult.Success#Success(androidx.biometric.BiometricPrompt.CryptoObject,kotlin.Int)(https://developer.android.com/reference/androidx/biometric/BiometricPrompt.CryptoObject crypto, int authType)` |

| ### Public methods |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/biometric/AuthenticationResult.Success#getAuthType()()` An integer representing the type of authentication(e.g. device credential or biometric) that was requested from and successfully provided by the user. |
| `final https://developer.android.com/reference/androidx/biometric/BiometricPrompt.CryptoObject` | `https://developer.android.com/reference/androidx/biometric/AuthenticationResult.Success#getCrypto()()` The `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.CryptoObject` associated with this transaction. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/biometric/AuthenticationResult.Success` | `https://developer.android.com/reference/androidx/biometric/AuthenticationResult.Success#success()()` Returns a `https://developer.android.com/reference/androidx/biometric/AuthenticationResult.Success` only if it's a `https://developer.android.com/reference/androidx/biometric/AuthenticationResult.Success`, returns null otherwise. |

### Inherited methods

From [androidx.biometric.AuthenticationResult](https://developer.android.com/reference/androidx/biometric/AuthenticationResult) `https://developer.android.com/reference/androidx/biometric/AuthenticationResult.CustomFallbackSelected` `https://developer.android.com/reference/androidx/biometric/AuthenticationResult#customFallbackSelected()()`

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

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

Whether this `https://developer.android.com/reference/androidx/biometric/AuthenticationResult` is a `https://developer.android.com/reference/androidx/biometric/AuthenticationResult.CustomFallbackSelected`.
`boolean` `https://developer.android.com/reference/androidx/biometric/AuthenticationResult#isError()()`

Whether this `https://developer.android.com/reference/androidx/biometric/AuthenticationResult` is an `https://developer.android.com/reference/androidx/biometric/AuthenticationResult.Error`.
`boolean` `https://developer.android.com/reference/androidx/biometric/AuthenticationResult#isSuccess()()`

Whether this `https://developer.android.com/reference/androidx/biometric/AuthenticationResult` is a `https://developer.android.com/reference/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)

```
public Success(BiometricPrompt.CryptoObject crypto, int authType)
```

## Public methods

### getAuthType

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

```
public final int getAuthType()
```

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

### getCrypto

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

```
public final BiometricPrompt.CryptoObject getCrypto()
```

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

### success

```
public @NonNull AuthenticationResult.Success success()
```

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