AuthenticationPolicyManager
public
final
class
AuthenticationPolicyManager
extends Object
| java.lang.Object | |
| ↳ | android.security.authenticationpolicy.AuthenticationPolicyManager |
AuthenticationPolicyManager is a centralized interface for managing authentication related policies on the device. AuthenticationPolicyManager is designed to protect Android users by integrating with apps and key system components, such as the lock screen. It is not related to enterprise control surfaces and does not offer additional administrative controls.
Secure Lock
Secure lockdown includes a set of device locking capabilities to protect users in "at risk" environments.
To use secure lock, call ERROR(/#enableSecureLockDevice) to enable it on the device.
This will require the caller to have the
ERROR(/android.Manifest.permission#MANAGE_SECURE_LOCK_DEVICE) permission.
To disable secure lock on the device, call ERROR(/#disableSecureLockDevice). This will require
the caller to have the ERROR(/android.Manifest.permission#MANAGE_SECURE_LOCK_DEVICE) permission.
To check if the device meets the requirements to enable secure lock, call
ERROR(/#getSecureLockDeviceAvailability). This will require the caller to have the
ERROR(/android.Manifest.permission#MANAGE_SECURE_LOCK_DEVICE) permission.
To check if secure lock is already enabled on the device, call
ERROR(/#isSecureLockDeviceEnabled). This will require the caller to have the
ERROR(/android.Manifest.permission#MANAGE_SECURE_LOCK_DEVICE) permission.
To listen for changes in the availability or enabled / disabled status of Secure Lock Device,
register a ERROR(SecureLockDeviceStatusListener/android.security.authenticationpolicy.AuthenticationPolicyManager.SecureLockDeviceStatusListener SecureLockDeviceStatusListener) using
ERROR(registerSecureLockDeviceStatusListener(Executor,SecureLockDeviceStatusListener)/#registerSecureLockDeviceStatusListener(java.util.concurrent.Executor,android.security.authenticationpolicy.AuthenticationPolicyManager.SecureLockDeviceStatusListener) registerSecureLockDeviceStatusListener(Executor,SecureLockDeviceStatusListener)).
To unregister a previously registered listener, use
ERROR(unregisterSecureLockDeviceStatusListener(SecureLockDeviceStatusListener)/#unregisterSecureLockDeviceStatusListener(android.security.authenticationpolicy.AuthenticationPolicyManager.SecureLockDeviceStatusListener) unregisterSecureLockDeviceStatusListener(SecureLockDeviceStatusListener)).
Cross Device Authentication Framework
AuthenticationPolicyManager exposes a set of methods that can be used by privileged components to gate access to select functionality.
This will require the caller to have the
ERROR(/android.Manifest.permission#MANAGE_CROSS_DEVICE_AUTHENTICATED_MESSAGES) permission.
Cross device access requests can be initiated on one device by calling
ERROR(createCrossDeviceAuthenticationRequest(DeviceId,String,Executor)/#createCrossDeviceAuthenticationRequest(android.companion.DeviceId,java.lang.String,java.util.concurrent.Executor) createCrossDeviceAuthenticationRequest(DeviceId,String,Executor)).
The returned token should be transmitted to another device, via any means, and the receiving
service should then use that token to call
ERROR(parseCrossDeviceAuthenticationRequest(byte[],String,Executor,OutcomeReceiver)/#parseCrossDeviceAuthenticationRequest(byte[],java.lang.String,java.util.concurrent.Executor,android.os.OutcomeReceiver) parseCrossDeviceAuthenticationRequest(byte[],String,Executor,OutcomeReceiver))
before executing the request. This ensures that a common set of security checks are
verified before executing the request and it decouples many form factor specific checks from
the service being guarded.
Summary
Inherited methods | |
|---|---|