Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
37.2](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/security/identity/CredentialDataRequest#nestedclasses) \| [Methods](https://developer.android.com/reference/android/security/identity/CredentialDataRequest#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/security/identity/CredentialDataRequest#inhmethods)

# CredentialDataRequest

*** ** * ** ***


`
public


class
CredentialDataRequest
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.security.identity.CredentialDataRequest |

<br />

*** ** * ** ***


**This class was deprecated
in API level 37.2.**   

Use `java.security.KeyStore` with the Android hardware-backed keystore instead.

An object representing a request for credential data.

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/security/identity/CredentialDataRequest.Builder` *This class was deprecated in API level 37.2. Use `java.security.KeyStore` with the Android hardware-backed keystore instead.* |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/java/util/Map<https://developer.android.com/reference/java/lang/String, https://developer.android.com/reference/java/util/Collection<https://developer.android.com/reference/java/lang/String>>` | ` https://developer.android.com/reference/android/security/identity/CredentialDataRequest#getDeviceSignedEntriesToRequest()() ` *This method is deprecated. Use `java.security.KeyStore` with the Android hardware-backed keystore instead.* |
| ` https://developer.android.com/reference/java/util/Map<https://developer.android.com/reference/java/lang/String, https://developer.android.com/reference/java/util/Collection<https://developer.android.com/reference/java/lang/String>>` | ` https://developer.android.com/reference/android/security/identity/CredentialDataRequest#getIssuerSignedEntriesToRequest()() ` *This method is deprecated. Use `java.security.KeyStore` with the Android hardware-backed keystore instead.* |
| ` byte[]` | ` https://developer.android.com/reference/android/security/identity/CredentialDataRequest#getReaderSignature()() ` *This method is deprecated. Use `java.security.KeyStore` with the Android hardware-backed keystore instead.* |
| ` byte[]` | ` https://developer.android.com/reference/android/security/identity/CredentialDataRequest#getRequestMessage()() ` *This method is deprecated. Use `java.security.KeyStore` with the Android hardware-backed keystore instead.* |
| ` boolean` | ` https://developer.android.com/reference/android/security/identity/CredentialDataRequest#isAllowUsingExhaustedKeys()() ` *This method is deprecated. Use `java.security.KeyStore` with the Android hardware-backed keystore instead.* |
| ` boolean` | ` https://developer.android.com/reference/android/security/identity/CredentialDataRequest#isAllowUsingExpiredKeys()() ` *This method is deprecated. Use `java.security.KeyStore` with the Android hardware-backed keystore instead.* |
| ` boolean` | ` https://developer.android.com/reference/android/security/identity/CredentialDataRequest#isIncrementUseCount()() ` *This method is deprecated. Use `java.security.KeyStore` with the Android hardware-backed keystore instead.* |

### Inherited methods

From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


## Public methods

### getDeviceSignedEntriesToRequest

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Map<String, Collection<String>> getDeviceSignedEntriesToRequest ()
```


**This method is deprecated.**   

Use `java.security.KeyStore` with the Android hardware-backed keystore
instead.

Gets the device-signed entries to request.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Map<https://developer.android.com/reference/java/lang/String, https://developer.android.com/reference/java/util/Collection<https://developer.android.com/reference/java/lang/String>>` | the device-signed entries to request. This value cannot be `null`. <br /> |

### getIssuerSignedEntriesToRequest

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Map<String, Collection<String>> getIssuerSignedEntriesToRequest ()
```


**This method is deprecated.**   

Use `java.security.KeyStore` with the Android hardware-backed keystore
instead.

Gets the issuer-signed entries to request.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Map<https://developer.android.com/reference/java/lang/String, https://developer.android.com/reference/java/util/Collection<https://developer.android.com/reference/java/lang/String>>` | the issuer-signed entries to request. This value cannot be `null`. <br /> |

### getReaderSignature

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public byte[] getReaderSignature ()
```


**This method is deprecated.**   

Use `java.security.KeyStore` with the Android hardware-backed keystore
instead.

Gets the reader signature.

This data structure is described in the documentation for the
`https://developer.android.com/reference/android/security/identity/PresentationSession#getCredentialData(java.lang.String,%20android.security.identity.CredentialDataRequest)` method.

<br />

| Returns ||
|---|---|
| `byte[]` | a `COSE_Sign1` structure as described above. This value may be `null`. <br /> |

### getRequestMessage

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public byte[] getRequestMessage ()
```


**This method is deprecated.**   

Use `java.security.KeyStore` with the Android hardware-backed keystore
instead.

Gets the request message CBOR.

This data structure is described in the documentation for the
`https://developer.android.com/reference/android/security/identity/PresentationSession#getCredentialData(java.lang.String,%20android.security.identity.CredentialDataRequest)` method.

<br />

| Returns ||
|---|---|
| `byte[]` | the request message CBOR as described above. This value may be `null`. <br /> |

### isAllowUsingExhaustedKeys

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isAllowUsingExhaustedKeys ()
```


**This method is deprecated.**   

Use `java.security.KeyStore` with the Android hardware-backed keystore
instead.

Gets whether to allow using an authentication key which use count has been exceeded.

By default this is set to true.

<br />

| Returns ||
|---|---|
| `boolean` | whether to allow using an authentication key which use count has been exceeded if no other key is available. <br /> |

### isAllowUsingExpiredKeys

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isAllowUsingExpiredKeys ()
```


**This method is deprecated.**   

Use `java.security.KeyStore` with the Android hardware-backed keystore
instead.

Gets whether to allow using an authentication key which is expired.

By default this is set to false.

<br />

| Returns ||
|---|---|
| `boolean` | whether to allow using an authentication key which is expired if no other key is available. <br /> |

### isIncrementUseCount

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isIncrementUseCount ()
```


**This method is deprecated.**   

Use `java.security.KeyStore` with the Android hardware-backed keystore
instead.

Gets whether to increment the use-count for the authentication key used.

By default this is set to true.

<br />

| Returns ||
|---|---|
| `boolean` | whether to increment the use count of the authentication key used. <br /> |