updated the readme.
[apps/agl-service-data-persistence.git] / README.md
1 # agl-identity
2
3 ## Binding
4
5 This binding provide the following API:
6 * `login`: Try to login the specified identity.
7 * `logout`: Try to logout the specified identity.
8 * `open_session`: Try to authenticate an identity using PAM.
9 * `close_session`: Try to close an opened session.
10 * `set_data`: Store a json for an identity/application pair.
11 * `get_data`: Get a json for an identity/application pair.
12
13 # PAM's module
14
15 This binding make use of PAM to authenticate a user.
16 A sample PAM module is provided, but you can write your own to allow different authentication workflows.
17
18 The sample module assume there is a `identity.json` file located at the root of an usb-stick. When the user plug-in the key, an udev's rule notify the binding and make a call to the `pam_auth` verb. The binding will then call the PAM module to authenticate the user. The sample PAM module will mount and read the file and open a session if the identity is valid.
19
20 When the user unplug the usb-stick, udev will notify the binding which will close the session.
21
22 # Udev's rules
23
24 The sample PAM module work with usb-stick. In order to detect plug and unplug action, some udev's rules are required.