Commit Graph

33 Commits (a9d45d656d057ce91d19ab268f7d1296aed367ae)

Author SHA1 Message Date
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
Ruslan Sayfutdinov 7195b8222b
Bump PyJWT to 2.1.0 (#55911) 2021-09-07 20:59:02 -07:00
Ville Skyttä 9864f2ef8b
String formatting cleanups (#52937) 2021-07-13 00:12:55 +02:00
Joakim Sørensen c8755cd896
Migrate the name for the hassio user (#51771) 2021-06-14 09:01:18 -07:00
Franck Nijhof ad13a9295e
Merge multiple context managers in tests (#48146) 2021-03-27 09:17:15 +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
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Paulus Schoutsen 2af984917e
Use asynctest-mock in most places (#35109)
* Use asynctest-mock in most places

* Fix broken patch in pilight
2020-05-03 11:27:19 -07: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
Franck Nijhof 0173c61fee
Spelling: Config(uration) (#31782) 2020-02-13 08:27:00 -08: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
Ville Skyttä 5216477353
Be consistent with Home Assistant and Hass.io spelling (#30500)
* Be consistent with Home Assistant spelling

* Be consistent with Hass.io spelling
2020-01-05 14:09:17 +02:00
Bas Nijholt f60125b5c9 Sort imports according to PEP8 for 'tests' (#29791) 2019-12-09 16:52:24 +01:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Paulus Schoutsen d2b62840f2
Add users added via credentials to admin group too (#18922)
* Add users added via credentials to admin group too

* Update test_init.py
2018-12-03 11:34:01 +01:00
Paulus Schoutsen 61f7a39748
Add permissions foundation (#16890)
* Add permission foundation

* Address comments

* typing

* False > True

* Convert more lambdas

* Use constants

* Remove support for False

* Fix only allow True
2018-10-11 19:24:25 +02:00
Paulus Schoutsen 61bf4d8a29 Add user events (#17328) 2018-10-11 17:06:51 +02:00
Jason Hu 7a77951bb4 Add Notify MFA module (#16314)
* Add Notify MFA

* Fix unit test

* Address review comment, change storage implementation

* Add retry limit to mfa module

* Fix loading

* Fix invalaid login log processing

* Typing

* Change default message template

* Change one-time password to 8 digit

* Refactoring to not save secret

* Bug fixing

* Change async_initialize method name to aysnc_initialize_login_mfa_step

* Address some simple fix code review comment
2018-09-24 11:06:50 +02:00
Jason Hu ff78a5b04b Track refresh token last usage information (#16408)
* Extend refresh_token to support last_used_at and last_used_by

* Address code review comment

* Remove unused code

* Add it to websocket response

* Fix typing
2018-09-12 13:24:16 +02:00
Jason Hu 9583947012 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`
2018-09-11 12:05:15 +02:00
Jason Hu 563588651c Tweak MFA login flow (#16254)
* Tweak MFA login flow

* Fix typo
2018-08-29 10:16:54 +02:00
Jason Hu 257b8b9b80 Blow up startup if init auth providers or modules failed (#16240)
* Blow up startup if init auth providers or modules failed

* Delete core.entity_registry
2018-08-28 20:54:01 +02:00
Jason Hu 7e7f9bc6ac Add multi-factor authentication modules (#15489)
* Get user after login flow finished

* Add multi factor authentication support

* Typings
2018-08-22 09:52:34 +02:00
Paulus Schoutsen cdb8361050 Add support for revoking refresh tokens (#16095)
* Add support for revoking refresh tokens

* Lint

* Split revoke logic in own method

* Simplify

* Update docs
2018-08-21 11:02:55 -07:00
Jason Hu f84a31871e Get user after login flow finished (#16047)
* Get user after login flow finished

* Add optional parameter 'type' to /auth/login_flow

* Update __init__.py
2018-08-21 10:18:04 +02:00
Paulus Schoutsen e776f88eec
Use JWT for access tokens (#15972)
* Use JWT for access tokens

* Update requirements

* Improvements
2018-08-14 21:14:12 +02:00
Paulus Schoutsen 864a254071
Aware comments (#15480)
* Make sure we cannot deactivate the owner

* Use different error code when trying to fetch token for inactive user
2018-07-15 23:09:05 +02:00
Paulus Schoutsen ed0cfc4f31
Add user via cmd line creates owner (#15470)
* Add user via cmd line creates owner

* Ensure access tokens are not verified for inactive users

* Stale print

* Lint
2018-07-15 20:46:15 +02:00
Paulus Schoutsen 70fe463ef0
User management (#15420)
* User management

* Lint

* Fix dict

* Reuse data instance

* OrderedDict all the way
2018-07-13 15:31:20 +02:00
Paulus Schoutsen b6ca03ce47
Reorg auth (#15443) 2018-07-13 11:43:08 +02:00