Skip to content
Snippets Groups Projects
Commit 3bf7aedf authored by Jakob Moser's avatar Jakob Moser
Browse files

Merge branch 'master' into 'master'

Document newly added features in README

See merge request moser/2fa!2
parents d7f0c7ed b1f24eb8
Branches master
No related tags found
No related merge requests found
......@@ -14,24 +14,22 @@ source venv/bin/activate
pip install -r requirements.txt
```
## Enrollment
## Enrollment of secret
Launch a Python shell, e.g., using:
```bash
source venv/bin/activate
python3
python3 main.py -e
```
Within the shell, type:
This will only store the secret locally in the secret storage, with minimal validation.
To facilitate scripting, you can also pass the token as a quoted (!) string to the script, i.e like that:
```python
from main import enroll_token
enroll_token("otpauth://totp/...") # replace this with the URL you've gotten from the 2FA enrollment system
```bash
python3 main.py -e "otpauth://totp/..."
```
This will only store the token locally in the secret storage, without any validation whatsoever.
## Get token
```bash
......@@ -39,6 +37,16 @@ source venv/bin/activate
./main.py
```
## Deletion of secret
If you ever want to delete the token, just call the script with the `-d` argument:
⚠️ there is no confirmation of the deletion, it will just delete the token!
```bash
python3 main.py -d
```
## License
This "project" is licensed under [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/), i.e., released to the public domain. TL;DR: You can do whatever the fuck you want to with this code, but don't hold me liable if something bad happens.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment