HA token

源码出处

jwt genertate: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/auth/__init__.py#L373

jwt validate: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/auth/__init__.py#L390

搜索

https://github.com/home-assistant/home-assistant/search?q=async_validate_access_token&unscoped_q=async_validate_access_token

https://github.com/home-assistant/home-assistant/blob/3231e22ddf2fdd65a36028bec5f87d8e7032118b/homeassistant/components/http/auth.py

1
2
简单的true false
    https://github.com/home-assistant/home-assistant/blob/3231e22ddf2fdd65a36028bec5f87d8e7032118b/homeassistant/components/http/auth.py#L74

https://github.com/home-assistant/home-assistant/blob/3231e22ddf2fdd65a36028bec5f87d8e7032118b/homeassistant/components/websocket_api/auth.py

1
2
3
4
5
6
7
弄懂 refresh_token
    https://github.com/home-assistant/home-assistant/blob/3231e22ddf2fdd65a36028bec5f87d8e7032118b/homeassistant/components/websocket_api/auth.py#L70

        refresh_token = await self.async_get_refresh_token(
        cast(str, unverif_claims.get("iss"))
    )
        https://github.com/home-assistant/home-assistant/blob/26b63e73ad1fb6826d52179b589a9578782ab6b6/homeassistant/auth/__init__.py#L354