Commit Graph

250 Commits

Author SHA1 Message Date
Norbert Rittel
5456cd0ac1 Fix spelling in user-facing strings of auth component (#144412) 2025-05-07 17:06:46 +01:00
epenet
d5568ff955 Standardize homeassistant imports in full-CI components (#136731)
Standardize homeassistant imports in components
2025-01-28 13:11:19 -05:00
Erik Montnemery
d6ee10a543 Make FlowHandler.context a typed dict (#126291)
* Make FlowHandler.context a typed dict

* Adjust typing

* Adjust typing

* Avoid calling ConfigFlowContext constructor in hot path
2024-10-08 12:18:45 +02:00
epenet
7e6c106869 Use HassKey in auth (#127573) 2024-10-04 16:34:04 +02:00
Erik Montnemery
252ce2c95b Improve FlowManager.async_finish_flow docstring (#126178)
* Improve FlowManager.async_finish_flow docstring

* Fix typos
2024-09-18 18:19:13 +02:00
Marc Mueller
156a2427ff Use aiohttp.ClientTimeout for timeout (#122458) 2024-07-23 08:20:04 -05:00
Marc Mueller
0e52d149e4 Update voluptuous to 0.15.2 (#120631)
* Update voluptuous to 0.15.1

* Fix typing issues

* Add type ignores for json result type

* Update voluptuous to 0.15.2

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-07-02 12:57:09 -07:00
Robert Resch
a0b604f98c Improve add user error messages (#120909) 2024-07-01 18:27:40 +02:00
Robert Resch
9f4bf6f11a Create repair when HA auth provider is running in legacy mode (#119975) 2024-06-26 09:00:33 +02:00
Robert Resch
641507a45a Add change username endpoint (#109057) 2024-06-24 18:51:19 +02:00
Robert Resch
bae008b0e2 Remove legacy_api_password auth provider (#119976) 2024-06-19 22:46:30 +02:00
epenet
960d1289ef Avoid references to websocket_api.const in core and other components (#119285) 2024-06-10 13:49:44 +02:00
Robert Resch
e087abe802 Add ws endpoint to remove expiration date from refresh tokens (#117546)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-29 09:09:59 +02:00
J. Nick Koston
79bc179ce8 Improve websocket message coalescing to handle thundering herds better (#118268)
* Increase websocket peak messages to match max expected entities

During startup the websocket would frequently disconnect if more than
4096 entities were added back to back. Some MQTT setups will have more
than 10000 entities. Match the websocket peak value to the max expected
entities

* coalesce more

* delay more if the backlog gets large

* wait to send if the queue is building rapidly

* tweak

* tweak for chrome since it works great in firefox but chrome cannot handle it

* Revert "tweak for chrome since it works great in firefox but chrome cannot handle it"

This reverts commit 439e2d76b1.

* adjust for chrome

* lower number

* remove code

* fixes

* fast path for bytes

* compact

* adjust test since we see the close right away now on overload

* simplify check

* reduce loop

* tweak

* handle ready right away
2024-05-28 23:14:06 -04:00
Robert Resch
cb62f4242e Remove strict connection (#117933) 2024-05-24 15:50:22 +02:00
Marc Mueller
87bb7ced79 Use PEP 695 for simple type aliases (#117633) 2024-05-17 14:42:21 +02:00
Sid
2cc916db6d Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +02:00
Sid
a5df229715 Bump ruff to 0.4.3 (#116749) 2024-05-04 11:56:40 +02:00
Robert Resch
348e1df949 Add strict connection (#112387)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-12 14:47:46 +02:00
J. Nick Koston
d9fc9f2e0c Convert async_setup calls for auth sub-modules to callback functions (#115443) 2024-04-11 11:22:50 -10:00
Sid
0d66d298ec Enable Ruff RET504 (#114528)
* Enable Ruff RET504

* fix test

* Use noqa instead of cast

* fix sonos RET504

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-06 11:07:37 +02:00
Sid
6587ee20db Enable Ruff TRY300 (#114437)
* Enable Ruff TRY300

* Update validation.py

* Address review comments
2024-03-30 10:37:59 +01:00
Joost Lekkerkerker
6bb4e7d62c Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Sid
82a60fe8ad Enable Ruff RSE (#113695) 2024-03-18 00:40:38 +01:00
Sid
6113b99ddd Replace pylint pointless-statement with ruff B018 (#113582)
* Replace pylint pointless-statement with ruff B018

* fix occurrences of B018

* disable pylint expression-not-assigned as well

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-17 10:58:14 +01:00
Marc Mueller
ff3a801936 Add empty line after module docstring [a-d] (#112697) 2024-03-08 14:51:32 +01:00
Marc Mueller
531e25cbc6 Change KEY_HASS to be an aiohttp AppKey (#111954) 2024-03-07 13:37:48 +01:00
Erik Montnemery
82efb3d35b Make FlowResult a generic type (#111952) 2024-03-07 12:41:14 +01:00
Erik Montnemery
3d3e9900c3 Add TypeVar default for FlowResult (#112345)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2024-03-05 22:52:11 +01:00
Erik Montnemery
a0e558c457 Add generic classes BaseFlowHandler and BaseFlowManager (#111814)
* Add generic classes BaseFlowHandler and BaseFlowManager

* Migrate zwave_js

* Update tests

* Update tests

* Address review comments
2024-02-29 16:52:39 +01:00
Marc Mueller
c82933175d Use builtin TimeoutError [a-d] (#109678) 2024-02-05 11:31:33 +01:00
J. Nick Koston
53db392150 Convert auth token removal websocket api to normal functions (#109432)
There was nothing being awaited here anymore
2024-02-03 07:47:07 +01:00
karwosts
f456e3a071 Allow delete_all_refresh_tokens to delete a specific token_type (#106119)
* Allow delete_all_refresh_tokens to delete a specific token_type

* add a test

* minor string change

* test updates

* more test updates

* more test updates

* fix tests

* do not delete current token

* Update tests/components/auth/test_init.py

* Update tests/components/auth/test_init.py

* Option to not delete the current token

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-01-29 17:09:23 +01:00
J. Nick Koston
2eea658fd8 Convert getting and removing access tokens to normal functions (#108670) 2024-01-22 20:51:33 -10:00
Robert Resch
1c669c6e84 Revert "Revert "Add preselect_remember_me to /auth/providers"" (#106867) 2024-01-11 10:37:19 +01:00
Franck Nijhof
0f3e6b0dec Revert "Add preselect_remember_me to /auth/providers" (#106472)
Revert "Add preselect_remember_me to `/auth/providers` (#106462)"

This reverts commit c19688e2d2.
2023-12-27 13:22:12 +01:00
Robert Resch
c19688e2d2 Add preselect_remember_me to /auth/providers (#106462) 2023-12-27 11:47:52 +01:00
Franck Nijhof
cc75430af3 Disable user profiles on login screen (#105749) 2023-12-14 20:28:08 +01:00
Robert Resch
cf9b0e804f Deprecate legacy api auth provider (#104409)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:16:18 +01:00
Robert Resch
852fb58ca8 Extend auth/providers endpoint and add /api/person/list endpoint for local ip requests (#103906)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-11-24 17:11:54 +01:00
J. Nick Koston
da1780f9ec Small cleanups to process_success_login (#103282) 2023-11-07 10:48:34 +01:00
Robert Resch
6223b1f599 Add ws endpoint "auth/delete_all_refresh_tokens" (#98976)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-08-29 15:57:54 +02:00
Franck Nijhof
18dddd6342 Update Ruff to v0.0.277 (#96108) 2023-07-09 10:10:23 -04:00
Erik Montnemery
8053073a77 Add empty config schema to integrations a-c (#93608) 2023-05-29 14:38:33 -04:00
Erik Montnemery
231aad7a68 Sort manifests 1 (#87022) 2023-02-08 20:29:44 +01:00
Franck Nijhof
939eef3b28 Remove translations from Core (#87543)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-06 15:06:43 +01:00
Franck Nijhof
3b5fd4bd06 Enable Ruff TRY004 (#86811) 2023-01-30 14:06:52 +01:00
Marc Mueller
6397138589 Update Optional typing (1) [Py310] (#86417)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-01-23 09:56:10 +01:00
Joris Pelgröm
8aeb20db00 Update allowlisted OAuth redirect URIs for Wear OS in China (#86247) 2023-01-19 16:07:08 -05:00
GitHub Action
2976f843b5 [ci skip] Translation update 2023-01-07 00:22:33 +00:00