mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Bump pyotp to 2.6.0 (#58413)
This commit is contained in:
parent
4db743d01f
commit
370c7a7ccf
@ -25,7 +25,7 @@ from . import (
|
|||||||
SetupFlow,
|
SetupFlow,
|
||||||
)
|
)
|
||||||
|
|
||||||
REQUIREMENTS = ["pyotp==2.3.0"]
|
REQUIREMENTS = ["pyotp==2.6.0"]
|
||||||
|
|
||||||
CONF_MESSAGE = "message"
|
CONF_MESSAGE = "message"
|
||||||
|
|
||||||
@ -56,10 +56,10 @@ def _generate_secret() -> str:
|
|||||||
|
|
||||||
|
|
||||||
def _generate_random() -> int:
|
def _generate_random() -> int:
|
||||||
"""Generate a 8 digit number."""
|
"""Generate a 32 digit number."""
|
||||||
import pyotp # pylint: disable=import-outside-toplevel
|
import pyotp # pylint: disable=import-outside-toplevel
|
||||||
|
|
||||||
return int(pyotp.random_base32(length=8, chars=list("1234567890")))
|
return int(pyotp.random_base32(length=32, chars=list("1234567890")))
|
||||||
|
|
||||||
|
|
||||||
def _generate_otp(secret: str, count: int) -> str:
|
def _generate_otp(secret: str, count: int) -> str:
|
||||||
|
@ -18,7 +18,7 @@ from . import (
|
|||||||
SetupFlow,
|
SetupFlow,
|
||||||
)
|
)
|
||||||
|
|
||||||
REQUIREMENTS = ["pyotp==2.3.0", "PyQRCode==1.2.1"]
|
REQUIREMENTS = ["pyotp==2.6.0", "PyQRCode==1.2.1"]
|
||||||
|
|
||||||
CONFIG_SCHEMA = MULTI_FACTOR_AUTH_MODULE_SCHEMA.extend({}, extra=vol.PREVENT_EXTRA)
|
CONFIG_SCHEMA = MULTI_FACTOR_AUTH_MODULE_SCHEMA.extend({}, extra=vol.PREVENT_EXTRA)
|
||||||
|
|
||||||
@ -181,7 +181,7 @@ class TotpSetupFlow(SetupFlow):
|
|||||||
# to fix typing complaint
|
# to fix typing complaint
|
||||||
self._auth_module: TotpAuthModule = auth_module
|
self._auth_module: TotpAuthModule = auth_module
|
||||||
self._user = user
|
self._user = user
|
||||||
self._ota_secret: str | None = None
|
self._ota_secret: str = ""
|
||||||
self._url = None # type Optional[str]
|
self._url = None # type Optional[str]
|
||||||
self._image = None # type Optional[str]
|
self._image = None # type Optional[str]
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"domain": "otp",
|
"domain": "otp",
|
||||||
"name": "One-Time Password (OTP)",
|
"name": "One-Time Password (OTP)",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/otp",
|
"documentation": "https://www.home-assistant.io/integrations/otp",
|
||||||
"requirements": ["pyotp==2.3.0"],
|
"requirements": ["pyotp==2.6.0"],
|
||||||
"codeowners": [],
|
"codeowners": [],
|
||||||
"quality_scale": "internal",
|
"quality_scale": "internal",
|
||||||
"iot_class": "local_polling"
|
"iot_class": "local_polling"
|
||||||
|
@ -1699,7 +1699,7 @@ pyotgw==1.1b1
|
|||||||
# homeassistant.auth.mfa_modules.notify
|
# homeassistant.auth.mfa_modules.notify
|
||||||
# homeassistant.auth.mfa_modules.totp
|
# homeassistant.auth.mfa_modules.totp
|
||||||
# homeassistant.components.otp
|
# homeassistant.components.otp
|
||||||
pyotp==2.3.0
|
pyotp==2.6.0
|
||||||
|
|
||||||
# homeassistant.components.openweathermap
|
# homeassistant.components.openweathermap
|
||||||
pyowm==3.2.0
|
pyowm==3.2.0
|
||||||
|
@ -1024,7 +1024,7 @@ pyotgw==1.1b1
|
|||||||
# homeassistant.auth.mfa_modules.notify
|
# homeassistant.auth.mfa_modules.notify
|
||||||
# homeassistant.auth.mfa_modules.totp
|
# homeassistant.auth.mfa_modules.totp
|
||||||
# homeassistant.components.otp
|
# homeassistant.components.otp
|
||||||
pyotp==2.3.0
|
pyotp==2.6.0
|
||||||
|
|
||||||
# homeassistant.components.openweathermap
|
# homeassistant.components.openweathermap
|
||||||
pyowm==3.2.0
|
pyowm==3.2.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user