92 Commits

Author SHA1 Message Date
Marc Mueller
32c1b519ad
Improve auth generic typing (#133061) 2024-12-12 20:14:56 +01: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
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
Joost Lekkerkerker
1fdd056c0e
Fix ruff manual-dict-comprehension PERF403 (#120723)
* Fix PERF403

* Fix

* Fix
2024-06-28 14:17:47 +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
Erik Montnemery
27fe00125d
Fix typo in auth (#119388) 2024-06-11 14:01:23 +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
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
Robert Resch
348e1df949
Add strict connection (#112387)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-12 14:47:46 +02:00
Marc Mueller
19ab3d6daf
Add empty line after module docstring [helpers + other] (#112707) 2024-03-08 10:36:11 -05: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
Michael
bb8828c86f
Address late review on auth (#108852) 2024-01-25 18:15:35 +01:00
Michael
f5d439799b
Add expiration of unused refresh tokens (#108428)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-01-24 13:24:22 -10:00
J. Nick Koston
2eea658fd8
Convert getting and removing access tokens to normal functions (#108670) 2024-01-22 20:51:33 -10:00
J. Nick Koston
740209912c
Small performance improvements to handing revoke token callbacks (#108625)
- Use a set to avoid linear search for remove
- Avoid recreating the unregister function each time
2024-01-21 22:49:06 -05:00
J. Nick Koston
ec15b0def2
Always load auth storage at startup (#108543) 2024-01-20 16:16:43 -10:00
Hejki
65a2f5bcd5
Support for group into command_line auth provider (#92906)
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-11-24 13:19:25 +01:00
J. Nick Koston
2dfc8b9d7f
Avoid conversion of timestamps in jwt auth (#101856) 2023-10-13 14:11:17 +02:00
J. Nick Koston
ca576d45ac
Cache decode of JWT tokens (#90013) 2023-03-22 16:03:41 -10: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
Franck Nijhof
b0cee0bc46
String formatting and max line length - Part 1 (#84390)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-12-22 10:12:50 +01:00
Erik Montnemery
bf4c399b19
Improve data entry flow typing (#84030) 2022-12-15 12:41:20 +01:00
Marc Mueller
0c8eeaa643
Update mypy to 0.990 (#81783)
* Update mypy to 0.990

* Remove type ignore - overriding attr with property (13475)

* Remove type ignores - hasattr (13544)

* Adjust type ignore - assignment (13549)

* New error code - type-abstract (13785)

* Disable annotation-unchecked (13851)
2022-11-08 14:41:39 +01:00
J. Nick Koston
211e5432ac
Add EVENT_USER_UPDATED (#71965) 2022-06-09 20:49:02 -07:00
epenet
f91aa33c5f
Add FlowResultType enum to data entry flow (#72955) 2022-06-07 22:02:44 -07:00
Marc Mueller
1ad023a63f
Add type ignore error codes [auth] (#66774) 2022-02-18 23:29:56 +01:00
Marc Mueller
12757a8cd2
Update typing - collections.abc (1) (#63933)
* Update typing - collections.abc (1)

* Additional typing updates
2022-01-12 07:56:35 +01:00
Marc Mueller
d3b7bd25ef
Update typing (1) (#63922) 2022-01-11 21:26:03 +01:00
Paulus Schoutsen
914f7f85ec
Add local only users (#57598) 2021-11-29 14:01:03 -08:00
Paulus Schoutsen
ffbe4cffae
Guard linking credential that is already linked (#57595)
* Guard linking credential that is already linked

* Update test descriptions
2021-10-13 17:36:31 +02:00
Paulus Schoutsen
0ae1186554
Use gather ipv wait to remove credentials to catch exceptions (#57596) 2021-10-13 17:34:57 +02:00
David Boslee
7f966613bd
Disconnect websockets after token is revoked (#57091)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-10-08 09:38:22 -07:00
Marc Mueller
7af67d34cf
Use assignment expressions 01 (#56394) 2021-09-18 13:31:35 -10:00
Ruslan Sayfutdinov
7195b8222b
Bump PyJWT to 2.1.0 (#55911) 2021-09-07 20:59:02 -07:00
Ruslan Sayfutdinov
016abda12e
Pylint plugin to check that relative imports are used (#50937)
* Pylint plugin to check that relative imports are used

* Fix existing sites

* Update description message

* Fix typo
2021-05-22 09:15:30 +01:00
Ruslan Sayfutdinov
391b2f8ccd
Add missing return type in Core constructors (#50884) 2021-05-20 18:53:29 +03:00
Ruslan Sayfutdinov
183220008d
Rename FlowResultDict to FlowResult (#49847) 2021-04-29 13:40:51 +02:00
Ruslan Sayfutdinov
80f66f301b
Define data flow result type (#49260)
* Define data flow result type

* Revert explicit definitions

* Fix tests

* Specific mypy ignore
2021-04-15 07:17:07 -10:00
Marc Mueller
fabd73f08b
Update typing 03 (#48015) 2021-03-17 21:46:07 +01:00
Franck Nijhof
9b7c39d20b
Postponed evaluation of annotations in core (#46434)
* Postponed evaluation of annotations in core

* Remove unneeded future
2021-02-12 10:58:20 +01:00
Joakim Plate
38d2cacf7a
Support blocking trusted network from new ip (#44630)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-01-28 12:06:20 +01:00
Philip Allgaier
bf4e6a289a
Add option to deactivate a user (#43463) 2020-11-27 09:13:16 +01:00
Philip Allgaier
625bbe6238
Cleanup unused loggers (components A-M) (#41600) 2020-10-12 16:59:05 +02:00
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Bram Kragten
952aa02e37
Add ability to specify group when creating user (#33373)
* Add abbility to specify group when creating user

* Fix tests

* Not default admin and tests
2020-03-30 20:33:43 +02:00
Christian Clauss
df7d2b3aeb
Fix typos found by codespell (#31243)
* Fix typos found by codespell

* Fix typos found by codespell

* codespell: Furture  ==> Future

* Update test_config_flow.py

* Update __init__.py

* Spellcheck: successfull  ==> successful

* Codespell: unsuccesful  ==> unsuccessful

* Codespell: cant  ==> can't

* Codespell: firware ==> firmware

* Codespell: mimick  ==> mimic
2020-01-31 08:33:00 -08:00