Compare commits

...

2 commits

Author SHA1 Message Date
559063ed90
Refactored required dependencies for qrcode.
Some checks failed
continuous-integration/drone/push Build is failing
2024-11-10 19:01:00 +01:00
46321559ab
[otp] Explicitly cast the output of otp.generate_secret to string.
Some versions of `pyotp` may return an intermediate
`pyotp.random_base32` object that is not JSON-serializable.
2024-11-10 18:52:10 +01:00
8 changed files with 11 additions and 51 deletions

View file

@ -11,6 +11,7 @@ py3-mypy-extensions
py3-otp py3-otp
py3-psutil py3-psutil
py3-pygments py3-pygments
py3-pyzbar
py3-qrcode py3-qrcode
py3-redis py3-redis
py3-requests py3-requests

View file

@ -10,6 +10,7 @@ python-pip
python-psutil python-psutil
python-pygments python-pygments
python-pyotp python-pyotp
python-pyzbar
python-qrcode python-qrcode
python-redis python-redis
python-requests python-requests

View file

@ -12,6 +12,7 @@ python3-mypy-extensions
python3-psutil python3-psutil
python3-pygments python3-pygments
python3-pyotp python3-pyotp
python3-pyzbar
python3-qrcode python3-qrcode
python3-redis python3-redis
python3-requests python3-requests

View file

@ -12,6 +12,7 @@ python-mypy_extensions
python-psutil python-psutil
python-pygments python-pygments
python-pyotp python-pyotp
python-pyzbar
python-qrcode python-qrcode
python-redis python-redis
python-requests python-requests

View file

@ -80,7 +80,7 @@ class OtpPlugin(Plugin):
:return: The new secret token. :return: The new secret token.
""" """
return pyotp.random_base32() return str(pyotp.random_base32())
@action @action
def refresh_secret(self, secret_path: Optional[str] = None) -> str: def refresh_secret(self, secret_path: Optional[str] = None) -> str:

View file

@ -1,23 +1,7 @@
{ {
"manifest": { "manifest": {
"events": {}, "events": {},
"install": { "install": {},
"apk": [
"py3-otp"
],
"apt": [
"python3-pyotp"
],
"dnf": [
"python-pyotp"
],
"pacman": [
"python-pyotp"
],
"pip": [
"pyotp"
]
},
"package": "platypush.plugins.otp", "package": "platypush.plugins.otp",
"type": "plugin" "type": "plugin"
} }

View file

@ -3,37 +3,7 @@
"events": [ "events": [
"platypush.message.event.qrcode.QrcodeScannedEvent" "platypush.message.event.qrcode.QrcodeScannedEvent"
], ],
"install": { "install": {},
"apk": [
"py3-numpy",
"py3-pillow",
"py3-qrcode",
"py3-pyzbar"
],
"apt": [
"python3-numpy",
"python3-pillow",
"python3-pyzbar",
"python3-qrcode"
],
"dnf": [
"python-numpy",
"python-pillow",
"python-qrcode",
"python-zbar"
],
"pacman": [
"python-numpy",
"python-pillow",
"python-qrcode"
],
"pip": [
"numpy",
"qrcode",
"pyzbar",
"Pillow"
]
},
"package": "platypush.plugins.qrcode", "package": "platypush.plugins.qrcode",
"type": "plugin" "type": "plugin"
} }

View file

@ -7,11 +7,13 @@ croniter
docutils docutils
flask flask
marshmallow marshmallow
Pillow
python-dateutil python-dateutil
python-magic python-magic
pygments pygments
pyotp pyotp
pyyaml pyyaml
pyzbar
qrcode qrcode
redis redis
requests requests