AccessControlProfile.Builder
public
static
final
class
AccessControlProfile.Builder
extends Object
| java.lang.Object | |
| ↳ | android.security.identity.AccessControlProfile.Builder |
This class was deprecated
in API level 10000.
Use java.security.KeyStore with the Android hardware-backed keystore
instead.
A builder for AccessControlProfile.
Summary
Public constructors | |
|---|---|
Builder(AccessControlProfileId accessControlProfileId)
This constructor is deprecated.
Use |
|
Public methods | |
|---|---|
AccessControlProfile
|
build()
This method is deprecated.
Use |
AccessControlProfile.Builder
|
setReaderCertificate(X509Certificate readerCertificate)
This method is deprecated.
Use |
AccessControlProfile.Builder
|
setUserAuthenticationRequired(boolean userAuthenticationRequired)
This method is deprecated.
Use |
AccessControlProfile.Builder
|
setUserAuthenticationTimeout(long userAuthenticationTimeoutMillis)
This method is deprecated.
Use |
Inherited methods | |
|---|---|
Public constructors
Builder
public Builder (AccessControlProfileId accessControlProfileId)
This constructor is deprecated.
Use java.security.KeyStore with the Android hardware-backed keystore
instead.
Each access control profile has numeric identifier that must be unique within the context of a Credential and may be used to reference the profile.
By default, the resulting AccessControlProfile will require user
authentication with a timeout of zero, thus requiring the holder to authenticate for
every presentation where data elements using this access control profile is used.
| Parameters | |
|---|---|
accessControlProfileId |
AccessControlProfileId: the access control profile identifier.
This value cannot be null. |
Public methods
build
public AccessControlProfile build ()
This method is deprecated.
Use java.security.KeyStore with the Android hardware-backed keystore
instead.
Creates a new AccessControlProfile from the data supplied to the builder.
| Returns | |
|---|---|
AccessControlProfile |
The created AccessControlProfile object.
This value cannot be null. |
setReaderCertificate
public AccessControlProfile.Builder setReaderCertificate (X509Certificate readerCertificate)
This method is deprecated.
Use java.security.KeyStore with the Android hardware-backed keystore
instead.
Sets the reader certificate to use when checking access control.
If set, this is checked against the certificate chain presented by reader. The access check is fulfilled only if one of the certificates in the chain, matches the certificate set by this method.
| Parameters | |
|---|---|
readerCertificate |
X509Certificate: the certificate to use for the access control check.
This value cannot be null. |
| Returns | |
|---|---|
AccessControlProfile.Builder |
The builder.
This value cannot be null. |
setUserAuthenticationRequired
public AccessControlProfile.Builder setUserAuthenticationRequired (boolean userAuthenticationRequired)
This method is deprecated.
Use java.security.KeyStore with the Android hardware-backed keystore
instead.
Set whether user authentication is required.
This should be used sparingly since disabling user authentication on just a single data element can easily create a Relay Attack if the device on which the credential is stored is compromised.
| Parameters | |
|---|---|
userAuthenticationRequired |
boolean: Set to true if user authentication is required,
false otherwise. |
| Returns | |
|---|---|
AccessControlProfile.Builder |
The builder.
This value cannot be null. |
setUserAuthenticationTimeout
public AccessControlProfile.Builder setUserAuthenticationTimeout (long userAuthenticationTimeoutMillis)
This method is deprecated.
Use java.security.KeyStore with the Android hardware-backed keystore
instead.
Sets the authentication timeout to use.
The authentication timeout specifies the amount of time, in milliseconds, for which a
user authentication is valid, if user authentication is required (see
setUserAuthenticationRequired(boolean)).
If the timeout is zero, then authentication is always required for each reader session.
| Parameters | |
|---|---|
userAuthenticationTimeoutMillis |
long: the authentication timeout, in milliseconds. |
| Returns | |
|---|---|
AccessControlProfile.Builder |
The builder.
This value cannot be null. |