# ProviderClearCredentialStateRequest

Artifact: [androidx.credentials:credentials](https://developer.android.com/jetpack/androidx/releases/credentials) [View Source](https://cs.android.com/search?q=file:androidx/credentials/provider/ProviderClearCredentialStateRequest.kt+class:androidx.credentials.provider.ProviderClearCredentialStateRequest) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

*** ** * ** ***

<br />

```
class ProviderClearCredentialStateRequest
```

<br />

*** ** * ** ***

Request class for clearing a user's credential state from the credential providers.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-null-pointer-exception/index.html` | If `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderClearCredentialStateRequest#callingAppInfo()` is null Note : Credential providers are not expected to utilize the constructor in this class for any production flow. This constructor must only be used for testing purposes. |

## Summary

| ### Public companion functions |
|---|---|
| `https://developer.android.com/reference/android/os/Bundle.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderClearCredentialStateRequest#asBundle(androidx.credentials.provider.ProviderClearCredentialStateRequest)(request: https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderClearCredentialStateRequest)` Helper method to convert the given `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderClearCredentialStateRequest.Companion#asBundle(androidx.credentials.provider.ProviderClearCredentialStateRequest)` to a parcelable `https://developer.android.com/reference/android/os/Bundle.html`, in case the instance needs to be sent across a process. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderClearCredentialStateRequest` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderClearCredentialStateRequest#fromBundle(android.os.Bundle)(bundle: https://developer.android.com/reference/android/os/Bundle.html)` Helper method to convert a `https://developer.android.com/reference/android/os/Bundle.html` retrieved through `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderClearCredentialStateRequest#asBundle(androidx.credentials.provider.ProviderClearCredentialStateRequest)`, back to an instance of `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderClearCredentialStateRequest`. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderClearCredentialStateRequest#ProviderClearCredentialStateRequest(androidx.credentials.provider.CallingAppInfo)(callingAppInfo: https://developer.android.com/reference/kotlin/androidx/credentials/provider/CallingAppInfo)` constructs an instance of `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderClearCredentialStateRequest` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/provider/CallingAppInfo` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderClearCredentialStateRequest#callingAppInfo()` info pertaining to the calling app that's making the request |

## Public companion functions

### asBundle

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.5.0)

```
fun asBundle(request: ProviderClearCredentialStateRequest): Bundle
```

Helper method to convert the given `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderClearCredentialStateRequest.Companion#asBundle(androidx.credentials.provider.ProviderClearCredentialStateRequest)` to a parcelable `https://developer.android.com/reference/android/os/Bundle.html`, in case the instance needs to be sent across a process. Consumers of this method should use `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderClearCredentialStateRequest#fromBundle(android.os.Bundle)` to reconstruct the class instance back from the bundle returned here.

### fromBundle

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.5.0)

```
fun fromBundle(bundle: Bundle): ProviderClearCredentialStateRequest
```

Helper method to convert a `https://developer.android.com/reference/android/os/Bundle.html` retrieved through `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderClearCredentialStateRequest#asBundle(androidx.credentials.provider.ProviderClearCredentialStateRequest)`, back to an instance of `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderClearCredentialStateRequest`.

Throws `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` if the conversion fails. This means that the given `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderClearCredentialStateRequest.Companion#fromBundle(android.os.Bundle)` does not contain a `ProviderCreateCredentialRequest`. The bundle should be constructed and retrieved from `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderClearCredentialStateRequest#asBundle(androidx.credentials.provider.ProviderClearCredentialStateRequest)` itself and never be created from scratch to avoid the failure.

## Public constructors

### ProviderClearCredentialStateRequest

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

```
ProviderClearCredentialStateRequest(callingAppInfo: CallingAppInfo)
```

constructs an instance of `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderClearCredentialStateRequest`

| Parameters |
|---|---|
| `callingAppInfo: https://developer.android.com/reference/kotlin/androidx/credentials/provider/CallingAppInfo` | info pertaining to the calling app that's making the request |

## Public properties

### callingAppInfo

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

```
val callingAppInfo: CallingAppInfo
```

info pertaining to the calling app that's making the request