# SignalCredentialStateRequest

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

*** ** * ** ***


```
abstract class SignalCredentialStateRequest
```

<br />

Known direct subclasses [SignalAllAcceptedCredentialIdsRequest](https://developer.android.com/reference/kotlin/androidx/credentials/SignalAllAcceptedCredentialIdsRequest), [SignalCurrentUserDetailsRequest](https://developer.android.com/reference/kotlin/androidx/credentials/SignalCurrentUserDetailsRequest), [SignalUnknownCredentialRequest](https://developer.android.com/reference/kotlin/androidx/credentials/SignalUnknownCredentialRequest)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/SignalAllAcceptedCredentialIdsRequest` | A request to signal the complete list of public key credentials ids for a given user. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/SignalCurrentUserDetailsRequest` | A request to signal the user's current name and display name. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/SignalUnknownCredentialRequest` | A request to signal that a credential ID was not recognized by the relying party. |

*** ** * ** ***

Base request class for sending credential state signals to providers.

An application can construct a subtype request and call `https://developer.android.com/reference/kotlin/androidx/credentials/CredentialManager#signalCredentialState(androidx.credentials.SignalCredentialStateRequest)` to propagate a signal credential state request.

## Summary

| ### Public companion functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/SignalCredentialStateRequest` | `https://developer.android.com/reference/kotlin/androidx/credentials/SignalCredentialStateRequest#createFrom(kotlin.String,kotlin.String,kotlin.String)(requestType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, requestJson: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, origin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` Creates a SignalCredentialStateRequest from the given parameters. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/credentials/SignalCredentialStateRequest#origin()` the origin of a different application if the request is being made on behalf of that application (Note: for API level \>=34, setting a non-null value for this parameter will throw a SecurityException if android.permission.CREDENTIAL_MANAGER_SET_ORIGIN is not present) |
| `https://developer.android.com/reference/android/os/Bundle.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/SignalCredentialStateRequest#requestData()` the bundle to contain the request json and any additional info |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/SignalCredentialStateRequest#requestJson()` the signal request data in the expected json format |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/SignalCredentialStateRequest#type()` the request type representing one of `https://developer.android.com/reference/kotlin/androidx/credentials/SignalAllAcceptedCredentialIdsRequest`, `https://developer.android.com/reference/kotlin/androidx/credentials/SignalCurrentUserDetailsRequest` and `https://developer.android.com/reference/kotlin/androidx/credentials/SignalUnknownCredentialRequest`) |

## Public companion functions

### createFrom

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

```
fun createFrom(requestType: String, requestJson: String, origin: String?): SignalCredentialStateRequest
```

Creates a SignalCredentialStateRequest from the given parameters.

| Parameters |
|---|---|
| `requestType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | the request type representing one of `https://developer.android.com/reference/kotlin/androidx/credentials/SignalAllAcceptedCredentialIdsRequest`, `https://developer.android.com/reference/kotlin/androidx/credentials/SignalCurrentUserDetailsRequest` and `https://developer.android.com/reference/kotlin/androidx/credentials/SignalUnknownCredentialRequest`) |
| `requestJson: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | the request json corresponding to the request data |
| `origin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | the origin of a different application if the request is being made on behalf of that application (Note: for API level \>=34, setting a non-null value for this parameter will throw a SecurityException if android.permission.CREDENTIAL_MANAGER_SET_ORIGIN is not present) |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if request json validation fails |
| `https://developer.android.com/reference/kotlin/androidx/credentials/exceptions/publickeycredential/SignalCredentialSecurityException` | if origin is set without having android.permission.CREDENTIAl_MANAGER_SET_ORIGIN |

## Public properties

### origin

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

```
val origin: String?
```

the origin of a different application if the request is being made on behalf of that application (Note: for API level \>=34, setting a non-null value for this parameter will throw a SecurityException if android.permission.CREDENTIAL_MANAGER_SET_ORIGIN is not present)

### requestData

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

```
val requestData: Bundle
```

the bundle to contain the request json and any additional info

### requestJson

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

```
val requestJson: String
```

the signal request data in the expected json format

### type

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

```
val type: String
```

the request type representing one of `https://developer.android.com/reference/kotlin/androidx/credentials/SignalAllAcceptedCredentialIdsRequest`, `https://developer.android.com/reference/kotlin/androidx/credentials/SignalCurrentUserDetailsRequest` and `https://developer.android.com/reference/kotlin/androidx/credentials/SignalUnknownCredentialRequest`)