diff options
-rw-r--r-- | anastasis.rst | 75 |
1 files changed, 50 insertions, 25 deletions
diff --git a/anastasis.rst b/anastasis.rst index 78a7b16..1d34acd 100644 --- a/anastasis.rst +++ b/anastasis.rst @@ -818,7 +818,8 @@ to store or load the different states the client application can have. The reducer takes a state_ in JSON syntax and returns the new state in JSON syntax. For example a **state** may take the following structure: -:: + +.. code-block:: json { "backup_state": "CONTINENT_SELECTING", @@ -830,7 +831,8 @@ For example a **state** may take the following structure: The new state depends on the previous one and on the transition action_ with its arguments given to the reducer. A **transition argument** also is a statement in JSON syntax: -:: + +.. code-block:: json { "continent": "Europe" @@ -838,7 +840,8 @@ arguments given to the reducer. A **transition argument** also is a statement in The new state returned by the reducer with the state and transition argument defined above would look like following for the transition action_ "select_continent": -:: + +.. code-block:: json { "backup_state": "COUNTRY_SELECTING", @@ -927,7 +930,8 @@ Initial state The initial states for backup and recovery processes are looking like following: **Initial backup state:** -:: + +.. code-block:: json { "backup_state": "CONTINENT_SELECTING", @@ -939,7 +943,8 @@ The initial states for backup and recovery processes are looking like following: **Initial backup state:** -:: + +.. code-block:: json { "recovery_state": "CONTINENT_SELECTING", @@ -956,14 +961,16 @@ Common transitions **select_continent:** Arguments (example): -:: + +.. code-block:: json { "continent": "Europe" } Expected new state: -:: + +.. code-block:: json { "backup_state": "COUNTRY_SELECTING", @@ -1006,7 +1013,8 @@ Expected new state: **select_country:** Arguments (example): -:: + +.. code-block:: json { "country": "Germany", @@ -1015,7 +1023,8 @@ Arguments (example): } Expected new state: -:: + +.. code-block:: json { "backup_state": "USER_ATTRIBUTES_COLLECTING", @@ -1143,7 +1152,8 @@ Expected new state: **enter_user_attributes:** Arguments (example): -:: + +.. code-block:: json { "identity_attributes": { @@ -1156,7 +1166,8 @@ Arguments (example): } Expected new state (backup process): -:: + +.. code-block:: json { "backup_state": "AUTHENTICATIONS_EDITING", @@ -1294,7 +1305,8 @@ No Arguments needed, but the **pay** transition may have optional arguments: **pay:** Optional arguments to try uploading just specific truths (example): -:: + +.. code-block:: json { "truth_index": [ @@ -1304,7 +1316,8 @@ Optional arguments to try uploading just specific truths (example): } Optional arguments to try uploading recovery document to specific providers (example): -:: + +.. code-block:: json { "provider_id": [ @@ -1320,7 +1333,8 @@ Backup transitions **add_authentication:** Arguments (example): -:: + +.. code-block:: json { "authentication_method": @@ -1334,7 +1348,8 @@ Arguments (example): } Expected new state: -:: + +.. code-block:: json { "backup_state": "AUTHENTICATIONS_EDITING", @@ -1541,14 +1556,16 @@ Expected new state: **del_authentication:** Arguments (example): -:: + +.. code-block:: json { "auth_method_index": 1 } Expected new state: -:: + +.. code-block:: json { "backup_state": "AUTHENTICATIONS_EDITING", @@ -1749,7 +1766,8 @@ Expected new state: **add_policy:** Arguments (example): -:: + +.. code-block:: json { "policy": [ @@ -1765,7 +1783,8 @@ Arguments (example): } Expected new state: -:: + +.. code-block:: json { "backup_state": "POLICIES_REVIEWING", @@ -2021,14 +2040,16 @@ Expected new state: **del_policy:** Arguments (example): -:: + +.. code-block:: json { "policy_index": 3 } Expected new state: -:: + +.. code-block:: json { "backup_state": "POLICIES_REVIEWING", @@ -2270,7 +2291,8 @@ Expected new state: **enter_secret:** Arguments (example): -:: + +.. code-block:: json { "secret": "someverysecretsecret", @@ -2281,7 +2303,8 @@ Arguments (example): - type: *data* (secret must be a Crockford-Base32 encoded string of some data, e.g. a private key) Expected new state: -:: + +.. code-block:: json { "backup_state": "POLICIES_REVIEWING", @@ -2584,7 +2607,8 @@ Recovery transitions **select_challenge:** Arguments (example): -:: + +.. code-block:: json { "challenge_index": 1 @@ -2594,7 +2618,8 @@ Arguments (example): **solve_challenge:** Arguments (example): -:: + +.. code-block:: json { "challenge_index": 1, |