mirror of
https://github.com/home-assistant/core.git
synced 2025-11-15 22:10:09 +00:00
Enforce permissions for Websocket API (#18719)
* Handle unauth exceptions in websocket * Enforce permissions in websocket API
This commit is contained in:
@@ -6,11 +6,12 @@ DOMAIN = 'websocket_api'
|
||||
URL = '/api/websocket'
|
||||
MAX_PENDING_MSG = 512
|
||||
|
||||
ERR_ID_REUSE = 1
|
||||
ERR_INVALID_FORMAT = 2
|
||||
ERR_NOT_FOUND = 3
|
||||
ERR_UNKNOWN_COMMAND = 4
|
||||
ERR_UNKNOWN_ERROR = 5
|
||||
ERR_ID_REUSE = 'id_reuse'
|
||||
ERR_INVALID_FORMAT = 'invalid_format'
|
||||
ERR_NOT_FOUND = 'not_found'
|
||||
ERR_UNKNOWN_COMMAND = 'unknown_command'
|
||||
ERR_UNKNOWN_ERROR = 'unknown_error'
|
||||
ERR_UNAUTHORIZED = 'unauthorized'
|
||||
|
||||
TYPE_RESULT = 'result'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user