update documentation
This commit is contained in:
@@ -19,17 +19,23 @@
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"ExecuteTime": {
|
||||
"end_time": "2025-03-24T20:18:04.947152Z",
|
||||
"start_time": "2025-03-24T20:18:04.916604Z"
|
||||
"end_time": "2025-03-24T20:25:00.701367Z",
|
||||
"start_time": "2025-03-24T20:25:00.698108Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"execution_count": 1
|
||||
"execution_count": 8
|
||||
},
|
||||
{
|
||||
"metadata": {},
|
||||
"cell_type": "markdown",
|
||||
"source": "## Initialize nKode API"
|
||||
"source": [
|
||||
"## Initialize nKode API and Create Customer\n",
|
||||
"#### nKode Customer\n",
|
||||
"An nKode customer is business has employees (users). An nKode API can service many customers each with their own users.\n",
|
||||
"Each customer specifies a keypad size and a nkode policy.\n",
|
||||
"The keypad can't be dispersable (`numb_of_keys < properties_per_key`)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
@@ -51,35 +57,41 @@
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"ExecuteTime": {
|
||||
"end_time": "2025-03-24T20:18:04.960698Z",
|
||||
"start_time": "2025-03-24T20:18:04.950723Z"
|
||||
"end_time": "2025-03-24T20:25:00.708966Z",
|
||||
"start_time": "2025-03-24T20:25:00.704877Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"execution_count": 2
|
||||
"execution_count": 9
|
||||
},
|
||||
{
|
||||
"metadata": {},
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## nKode Enrollment\n",
|
||||
"Users enroll in three steps:\n"
|
||||
"Users enroll in three steps:\n",
|
||||
"1. Create Signup Session\n",
|
||||
"2. Set nKode\n",
|
||||
"3. Confirm nKode\n",
|
||||
"\n",
|
||||
"#### Create Signup Session\n",
|
||||
"A user, associate with customer (or business), specifies a username and receives a signup_session_id and set_keypad. The keypad is a index array. It tells the client how to sort the user's icons."
|
||||
]
|
||||
},
|
||||
{
|
||||
"metadata": {
|
||||
"ExecuteTime": {
|
||||
"end_time": "2025-03-24T20:18:04.989029Z",
|
||||
"start_time": "2025-03-24T20:18:04.986797Z"
|
||||
"end_time": "2025-03-24T20:25:00.717550Z",
|
||||
"start_time": "2025-03-24T20:25:00.715159Z"
|
||||
}
|
||||
},
|
||||
"cell_type": "code",
|
||||
"source": [
|
||||
"username = random_username()\n",
|
||||
"signup_session_id, set_signup_keypad = api.generate_signup_keypad(customer_id, username)"
|
||||
"signup_session_id, set_keypad = api.generate_signup_keypad(customer_id, username)"
|
||||
],
|
||||
"outputs": [],
|
||||
"execution_count": 3
|
||||
"execution_count": 10
|
||||
},
|
||||
{
|
||||
"metadata": {},
|
||||
@@ -92,32 +104,32 @@
|
||||
{
|
||||
"metadata": {
|
||||
"ExecuteTime": {
|
||||
"end_time": "2025-03-24T20:18:04.997252Z",
|
||||
"start_time": "2025-03-24T20:18:04.995177Z"
|
||||
"end_time": "2025-03-24T20:25:00.726553Z",
|
||||
"start_time": "2025-03-24T20:25:00.724282Z"
|
||||
}
|
||||
},
|
||||
"cell_type": "code",
|
||||
"source": [
|
||||
"passcode_len = 4\n",
|
||||
"passcode_property_indices = np.random.choice(set_signup_keypad.reshape(-1), size=passcode_len, replace=False).tolist()\n",
|
||||
"selected_keys_set = select_keys_with_passcode_values(passcode_property_indices, set_signup_keypad, keypad_size.numb_of_keys)"
|
||||
"passcode_property_indices = np.random.choice(set_keypad.reshape(-1), size=passcode_len, replace=False).tolist()\n",
|
||||
"selected_keys_set = select_keys_with_passcode_values(passcode_property_indices, set_keypad, keypad_size.numb_of_keys)"
|
||||
],
|
||||
"outputs": [],
|
||||
"execution_count": 4
|
||||
"execution_count": 11
|
||||
},
|
||||
{
|
||||
"metadata": {},
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"### Confirm nKode\n",
|
||||
"Submit the set key entry to render the confirm keypad."
|
||||
"The user enter then submits their key entry. The server returns the confirm_keypad, another index array and dispersion of the set_keypad."
|
||||
]
|
||||
},
|
||||
{
|
||||
"metadata": {
|
||||
"ExecuteTime": {
|
||||
"end_time": "2025-03-24T20:18:05.239384Z",
|
||||
"start_time": "2025-03-24T20:18:05.002825Z"
|
||||
"end_time": "2025-03-24T20:25:00.967386Z",
|
||||
"start_time": "2025-03-24T20:25:00.732130Z"
|
||||
}
|
||||
},
|
||||
"cell_type": "code",
|
||||
@@ -128,7 +140,7 @@
|
||||
"assert success"
|
||||
],
|
||||
"outputs": [],
|
||||
"execution_count": 5
|
||||
"execution_count": 12
|
||||
},
|
||||
{
|
||||
"metadata": {},
|
||||
@@ -142,8 +154,8 @@
|
||||
{
|
||||
"metadata": {
|
||||
"ExecuteTime": {
|
||||
"end_time": "2025-03-24T20:18:05.478978Z",
|
||||
"start_time": "2025-03-24T20:18:05.245767Z"
|
||||
"end_time": "2025-03-24T20:25:01.204427Z",
|
||||
"start_time": "2025-03-24T20:25:00.973454Z"
|
||||
}
|
||||
},
|
||||
"cell_type": "code",
|
||||
@@ -154,24 +166,24 @@
|
||||
"assert success"
|
||||
],
|
||||
"outputs": [],
|
||||
"execution_count": 6
|
||||
"execution_count": 13
|
||||
},
|
||||
{
|
||||
"metadata": {},
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## Renew Properties\n",
|
||||
"Replace server-side ciphers keys and nkode hash with new values.\n",
|
||||
"1. Renew Customer Properties\n",
|
||||
"2. Renew User Keys\n",
|
||||
"3. Refresh User on Login\n",
|
||||
"\n"
|
||||
"3. Refresh User on Login"
|
||||
]
|
||||
},
|
||||
{
|
||||
"metadata": {
|
||||
"ExecuteTime": {
|
||||
"end_time": "2025-03-24T20:18:05.950627Z",
|
||||
"start_time": "2025-03-24T20:18:05.484941Z"
|
||||
"end_time": "2025-03-24T20:25:01.677259Z",
|
||||
"start_time": "2025-03-24T20:25:01.209950Z"
|
||||
}
|
||||
},
|
||||
"cell_type": "code",
|
||||
@@ -183,7 +195,7 @@
|
||||
"assert success"
|
||||
],
|
||||
"outputs": [],
|
||||
"execution_count": 7
|
||||
"execution_count": 14
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
|
||||
Reference in New Issue
Block a user