Skip to content
Snippets Groups Projects

Document newly added features in README

Merged Sören Ducati requested to merge ducati/2fa:master into master
1 file
+ 16
8
Compare changes
  • Side-by-side
  • Inline
+ 16
8
@@ -14,24 +14,22 @@ source venv/bin/activate
@@ -14,24 +14,22 @@ source venv/bin/activate
pip install -r requirements.txt
pip install -r requirements.txt
```
```
## Enrollment
## Enrollment of secret
Launch a Python shell, e.g., using:
Launch a Python shell, e.g., using:
```bash
```bash
source venv/bin/activate
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
```bash
from main import enroll_token
python3 main.py -e "otpauth://totp/..."
enroll_token("otpauth://totp/...") # replace this with the URL you've gotten from the 2FA enrollment system
```
```
This will only store the token locally in the secret storage, without any validation whatsoever.
## Get token
## Get token
```bash
```bash
@@ -39,6 +37,16 @@ source venv/bin/activate
@@ -39,6 +37,16 @@ source venv/bin/activate
./main.py
./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
## 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.
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.
Loading