Policies - mapto/sprks GitHub Wiki
Policy Model
Currently the policy is meant to support 3 authentication mechanisms:
- password - see model in code for a description
- biometric - contains only "bdata", which can be either 1 (corresponding to "fingerprint"), and 2 ("iris-scan")
- passfaces (more accurately image-based) - contains only "pdata", taking values 1 ("passface"), 2 ("swipe-lock")
POST /api/chronos/policy
Request
There are three cases when policy content is being sent from client to server:
- User changes parameters: the list of changes is being sent as a dictionary corresponding to the policy name
- User disables a mechanism: an empty dictionary is passed corresponding to that policy name
- User doesn't change a policy: the policy name is not being sent
Examples
No authentication mechanism used:
policyDelta {
"pwpolicy": {}
"passfaces": {}
"biometric": {}
}
Use password and biometric:
policyDelta {
"pwpolicy": {"plen": 8, "phist": 2}
"biometric": {"bdata": 0}
"pasfaces": {}
}
Response
Sample
{
}