Remove no longer needed auth.util, use secrets instead (#29861)
This commit is contained in:
1 parent
c58c10ab7c
commit
130571c478
11 files changed
+24
-34
No files matched your search
@@ -1,10 +1,10 @@
|
||||
"""Webhooks for Home Assistant."""
|
||||
import logging
|
||||
import secrets
|
||||
|
||||
from aiohttp.web import Request, Response
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.auth.util import generate_secret
|
||||
from homeassistant.components import websocket_api
|
||||
from homeassistant.components.http.view import HomeAssistantView
|
||||
from homeassistant.core import callback
|
||||
@@ -46,7 +46,7 @@ def async_unregister(hass, webhook_id):
|
||||
@callback
|
||||
def async_generate_id():
|
||||
"""Generate a webhook_id."""
|
||||
return generate_secret(entropy=32)
|
||||
return secrets.token_hex(32)
|
||||
|
||||
|
||||
@callback
|
||||
|
||||
Reference in new issue
Block a user