specs.json removed, mv helper.py -> commands/helper.py
This commit is contained in:
parent
d045d70609
commit
99a15be2bc
3 changed files with 1 additions and 22 deletions
15
commands/helper.py
Normal file
15
commands/helper.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import click
|
||||
|
||||
from dataclasses import dataclass
|
||||
from pyotp import TOTP
|
||||
|
||||
|
||||
@dataclass
|
||||
class OTPCredentials:
|
||||
name: str
|
||||
realm: str
|
||||
seed: str
|
||||
|
||||
def get_json(self):
|
||||
r = {"name": self.name, "realm": self.realm, "token": TOTP(self.seed).now()}
|
||||
return r
|
||||
Loading…
Add table
Add a link
Reference in a new issue