Long-lived access token (#16453)

* Allow create refresh_token with specific access_token_expiration

* Add token_type, client_name and client_icon

* Add unit test

* Add websocket API to create long-lived access token

* Allow URL use as client_id for long-lived access token

* Remove mutate_refresh_token method

* Use client name as id for long_lived_access_token type refresh token

* Minor change

* Do not allow duplicate client name

* Update docstring

* Remove unnecessary `list`
This commit is contained in:
Jason Hu 2018-09-11 03:05:15 -07:00 committed by Paulus Schoutsen
parent 50fb59477a
commit 9583947012
7 changed files with 385 additions and 16 deletions

View file

@ -34,6 +34,8 @@ def hass_ws_client(aiohttp_client):
auth_ok = await websocket.receive_json()
assert auth_ok['type'] == wapi.TYPE_AUTH_OK
# wrap in client
websocket.client = client
return websocket
return create_client