# ClearCredentialStateRequest

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

*** ** * ** ***

<br />

```
class ClearCredentialStateRequest
```

<br />

*** ** * ** ***

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

If the request type is `https://developer.android.com/reference/kotlin/androidx/credentials/ClearCredentialStateRequest#TYPE_CLEAR_CREDENTIAL_STATE()`, then the request will be sent to the credential providers to clear the user's credential state.

If the request type is `https://developer.android.com/reference/kotlin/androidx/credentials/ClearCredentialStateRequest#TYPE_CLEAR_RESTORE_CREDENTIAL()`, then the request will be sent to the restore credential provider to delete any stored `https://developer.android.com/reference/kotlin/androidx/credentials/RestoreCredential`.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if the `https://developer.android.com/reference/kotlin/androidx/credentials/ClearCredentialStateRequest#requestType()` is unsupported type. |

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/ClearCredentialStateRequest#TYPE_CLEAR_CREDENTIAL_STATE()` Clears credential state from all credential providers that have cached a user sign-in states. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/ClearCredentialStateRequest#TYPE_CLEAR_RESTORE_CREDENTIAL()` Clears restore credential from the device and the backup |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/ClearCredentialStateRequest#ClearCredentialStateRequest(kotlin.String)(requestType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` creates a new ClearCredentialStateRequest |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/android/os/Bundle.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/ClearCredentialStateRequest#requestBundle()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/ClearCredentialStateRequest#requestType()` the type of this request |

## Constants

### TYPE_CLEAR_CREDENTIAL_STATE

```
const val TYPE_CLEAR_CREDENTIAL_STATE: String
```

Clears credential state from all credential providers that have cached a user sign-in states.

### TYPE_CLEAR_RESTORE_CREDENTIAL

```
const val TYPE_CLEAR_RESTORE_CREDENTIAL: String
```

Clears restore credential from the device and the backup

## Public constructors

### ClearCredentialStateRequest

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

```
ClearCredentialStateRequest(
    requestType: String = TYPE_CLEAR_CREDENTIAL_STATE
)
```

creates a new ClearCredentialStateRequest

## Public properties

### requestBundle

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

```
val requestBundle: Bundle
```

### requestType

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

```
val requestType: String
```

the type of this request