CredentialDataRequest.Builder
public
static
final
class
CredentialDataRequest.Builder
extends Object
| java.lang.Object | |
| ↳ | android.security.identity.CredentialDataRequest.Builder |
This class was deprecated
in API level 10000.
Use java.security.KeyStore with the Android hardware-backed keystore
instead.
A builder for CredentialDataRequest.
Summary
Public constructors | |
|---|---|
Builder()
This constructor is deprecated.
Use |
|
Public methods | |
|---|---|
CredentialDataRequest
|
build()
This method is deprecated.
Use |
CredentialDataRequest.Builder
|
setAllowUsingExhaustedKeys(boolean allowUsingExhaustedKeys)
This method is deprecated.
Use |
CredentialDataRequest.Builder
|
setAllowUsingExpiredKeys(boolean allowUsingExpiredKeys)
This method is deprecated.
Use |
CredentialDataRequest.Builder
|
setDeviceSignedEntriesToRequest(Map<String, Collection<String>> entriesToRequest)
This method is deprecated.
Use |
CredentialDataRequest.Builder
|
setIncrementUseCount(boolean incrementUseCount)
This method is deprecated.
Use |
CredentialDataRequest.Builder
|
setIssuerSignedEntriesToRequest(Map<String, Collection<String>> entriesToRequest)
This method is deprecated.
Use |
CredentialDataRequest.Builder
|
setReaderSignature(byte[] readerSignature)
This method is deprecated.
Use |
CredentialDataRequest.Builder
|
setRequestMessage(byte[] requestMessage)
This method is deprecated.
Use |
Inherited methods | |
|---|---|
Public constructors
Builder
public Builder ()
This constructor is deprecated.
Use java.security.KeyStore with the Android hardware-backed keystore
instead.
Creates a new builder.
Public methods
build
public CredentialDataRequest build ()
This method is deprecated.
Use java.security.KeyStore with the Android hardware-backed keystore
instead.
Finishes building a CredentialDataRequest.
| Returns | |
|---|---|
CredentialDataRequest |
the CredentialDataRequest object.
This value cannot be null. |
setAllowUsingExhaustedKeys
public CredentialDataRequest.Builder setAllowUsingExhaustedKeys (boolean allowUsingExhaustedKeys)
This method is deprecated.
Use java.security.KeyStore with the Android hardware-backed keystore
instead.
Sets whether to allow using an authentication key which use count has been exceeded.
This is useful in situations where the application hasn't had a chance to renew authentication keys, for example if the device hasn't been connected to the Internet or if the issuing authority server has been down.
The reason this could be useful is that the privacy risk of reusing an authentication key for a credential presentation could be significantly smaller compared to the inconvenience of not being able to present the credential at all.
By default this is set to true.
| Parameters | |
|---|---|
allowUsingExhaustedKeys |
boolean: whether to allow using an authentication key which use
count has been exceeded if no other key is available. |
| Returns | |
|---|---|
CredentialDataRequest.Builder |
the builder.
This value cannot be null. |
setAllowUsingExpiredKeys
public CredentialDataRequest.Builder setAllowUsingExpiredKeys (boolean allowUsingExpiredKeys)
This method is deprecated.
Use java.security.KeyStore with the Android hardware-backed keystore
instead.
Sets whether to allow using an authentication key which is expired.
This is useful in situations where the application hasn't had a chance to renew authentication keys, for example if the device hasn't been connected to the Internet or if the issuing authority server has been down.
The reason this could be useful is that many verifiers are likely to accept a credential presentation using an expired authentication key (the credential itself wouldn't be expired) and it's likely better for the holder to be able to do this than not present their credential at all.
By default this is set to false.
| Parameters | |
|---|---|
allowUsingExpiredKeys |
boolean: whether to allow using an authentication key which is
expired if no other key is available. |
| Returns | |
|---|---|
CredentialDataRequest.Builder |
the builder.
This value cannot be null. |
setDeviceSignedEntriesToRequest
public CredentialDataRequest.Builder setDeviceSignedEntriesToRequest (Map<String, Collection<String>> entriesToRequest)
This method is deprecated.
Use java.security.KeyStore with the Android hardware-backed keystore
instead.
Sets the device-signed entries to request.
| Parameters | |
|---|---|
entriesToRequest |
Map: the device-signed entries to request.
This value cannot be null. |
| Returns | |
|---|---|
CredentialDataRequest.Builder |
This value cannot be null. |
setIncrementUseCount
public CredentialDataRequest.Builder setIncrementUseCount (boolean incrementUseCount)
This method is deprecated.
Use java.security.KeyStore with the Android hardware-backed keystore
instead.
Sets whether to increment the use-count for the authentication key used.
Not incrementing the use-count for an authentication key is useful in situations where the authentication key is known with certainty to not be leaked. For example, consider an application doing a credential presentation for the sole purpose of displaying the credential data to the user (not for verification).
By default this is set to true.
| Parameters | |
|---|---|
incrementUseCount |
boolean: whether to increment the use count of the authentication
key used. |
| Returns | |
|---|---|
CredentialDataRequest.Builder |
the builder.
This value cannot be null. |
setIssuerSignedEntriesToRequest
public CredentialDataRequest.Builder setIssuerSignedEntriesToRequest (Map<String, Collection<String>> entriesToRequest)
This method is deprecated.
Use java.security.KeyStore with the Android hardware-backed keystore
instead.
Sets the issuer-signed entries to request.
| Parameters | |
|---|---|
entriesToRequest |
Map: the issuer-signed entries to request.
This value cannot be null. |
| Returns | |
|---|---|
CredentialDataRequest.Builder |
the builder.
This value cannot be null. |
setReaderSignature
public CredentialDataRequest.Builder setReaderSignature (byte[] readerSignature)
This method is deprecated.
Use java.security.KeyStore with the Android hardware-backed keystore
instead.
Sets the reader signature.
This data structure is described in the documentation for the
PresentationSession.getCredentialData(String,CredentialDataRequest) method.
| Parameters | |
|---|---|
readerSignature |
byte: a COSE_Sign1 structure as described above.
This value cannot be null. |
| Returns | |
|---|---|
CredentialDataRequest.Builder |
the builder.
This value cannot be null. |
setRequestMessage
public CredentialDataRequest.Builder setRequestMessage (byte[] requestMessage)
This method is deprecated.
Use java.security.KeyStore with the Android hardware-backed keystore
instead.
Sets the request message CBOR.
This data structure is described in the documentation for the
PresentationSession.getCredentialData(String,CredentialDataRequest) method.
| Parameters | |
|---|---|
requestMessage |
byte: the request message CBOR as described above.
This value cannot be null. |
| Returns | |
|---|---|
CredentialDataRequest.Builder |
the builder.
This value cannot be null. |