README.md updated
This commit is contained in:
parent
78326a52df
commit
d940a302fe
2 changed files with 4 additions and 23 deletions
|
@ -60,14 +60,14 @@ uotp
|
||||||
|
|
||||||
Run the following commands in your uotp directory
|
Run the following commands in your uotp directory
|
||||||
```shell
|
```shell
|
||||||
pipenv run python uotp/scripts/get-admin.py
|
uotp-client get-admin
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Create Auth Account (or any account)
|
#### Create Auth Account (or any account)
|
||||||
|
|
||||||
Run the following command in your uotp directory:
|
Run the following command in your uotp directory:
|
||||||
```shell
|
```shell
|
||||||
pipenv run python uotp/client create \
|
uotp-client create \
|
||||||
--name auth --realm ungleich-auth \
|
--name auth --realm ungleich-auth \
|
||||||
--admin-name admin --admin-realm ungleich-admin \
|
--admin-name admin --admin-realm ungleich-admin \
|
||||||
--admin-seed admin_seed_here
|
--admin-seed admin_seed_here
|
||||||
|
@ -78,14 +78,14 @@ Credentials of newly created account.
|
||||||
|
|
||||||
#### List All Accounts with credentials
|
#### List All Accounts with credentials
|
||||||
```shell
|
```shell
|
||||||
pipenv run python uotp/client.py list \
|
uotp-client list \
|
||||||
--admin-name admin_name_jere --admin-realm admin_realm_here \
|
--admin-name admin_name_jere --admin-realm admin_realm_here \
|
||||||
--admin-seed admin_seed_here
|
--admin-seed admin_seed_here
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Verify OTP Credentials
|
#### Verify OTP Credentials
|
||||||
```shell
|
```shell
|
||||||
pipenv run python uotp/client.py verify \
|
uotp-client verify \
|
||||||
--name user_name_here --realm user_realm_here \
|
--name user_name_here --realm user_realm_here \
|
||||||
--seed user_seed_here --auth-name auth_name_here \
|
--seed user_seed_here --auth-name auth_name_here \
|
||||||
--auth-realm auth_realm_here --auth-seed auth_seed_here
|
--auth-realm auth_realm_here --auth-seed auth_seed_here
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
import requests
|
|
||||||
import pyotp
|
|
||||||
import json
|
|
||||||
import decouple
|
|
||||||
import argparse
|
|
||||||
|
|
||||||
arg_parser = argparse.ArgumentParser()
|
|
||||||
arg_parser.add_argument("admin_seed")
|
|
||||||
args = arg_parser.parse_args()
|
|
||||||
|
|
||||||
r = requests.post("http://localhost:{}/create/".format(decouple.config("PORT")),
|
|
||||||
json={
|
|
||||||
"name": "auth",
|
|
||||||
"realm": ["ungleich-auth"],
|
|
||||||
"admin_name": "admin",
|
|
||||||
"admin_realm": "ungleich-admin",
|
|
||||||
"admin_token": pyotp.TOTP(args.admin_seed).now()
|
|
||||||
})
|
|
||||||
print(json.loads(r.content.decode("utf-8")))
|
|
Loading…
Reference in a new issue