Commit graph

24 commits

Author SHA1 Message Date
Paulus Schoutsen
914f7f85ec
Add local only users () 2021-11-29 14:01:03 -08:00
Franck Nijhof
dc15f243e6
Upgrade pyupgrade to v2.11.0 () 2021-03-22 13:29:39 +01:00
Marc Mueller
4cb7718192
Update typing 16 () 2021-03-18 22:58:19 +01:00
Marc Mueller
fabd73f08b
Update typing 03 () 2021-03-17 21:46:07 +01:00
Joakim Plate
38d2cacf7a
Support blocking trusted network from new ip ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-01-28 12:06:20 +01:00
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 () 2020-08-27 13:56:20 +02:00
Ville Skyttä
ac0dbb17af
Attrs cleanups () 2020-07-14 10:30:30 -07:00
Ville Skyttä
ffc9bcb4d7
Use PEP 526 syntax with NamedTuples () 2020-03-21 11:18:32 +02:00
springstan
744ae82933
Replace cmp option with eq and order () 2020-02-02 20:28:52 -08:00
Ville Skyttä
130571c478 Remove no longer needed auth.util, use secrets instead () 2019-12-12 16:46:33 +01:00
Ville Skyttä
33e1b44b3a
Use PEP 526 type annotations, add some type hints ()
* Add some more type hints to helpers.event

* Change most type comments to variable types

* Remove some superfluous type hints
2019-09-07 09:48:58 +03:00
Franck Nijhof
2f0eb07624 Migrate legacy typehints in core to PEP-526 ()
* Migrate legacy typehints in core to PEP-526

* Fix one type
2019-09-03 20:36:04 -07:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Paulus Schoutsen
3928d034a3 Allow checking entity permissions based on devices ()
* Allow checking entity permissions based on devices

* Fix tests
2018-12-05 11:41:00 +01:00
Paulus Schoutsen
8b8629a5f4 Add permission checks to Rest API ()
* Add permission checks to Rest API

* Clean up unnecessary method

* Remove all the tuple stuff from entity check

* Simplify perms

* Correct param name for owner permission

* Hass.io make/update user to be admin

* Types
2018-11-25 18:04:48 +01:00
Paulus Schoutsen
f7f0a4e811
System groups ()
* Add read only and admin policies

* Migrate to 2 system groups

* Add system groups

* Add system groups admin & read only

* Dont' mutate parameters

* Fix types
2018-11-08 12:57:00 +01:00
Paulus Schoutsen
61f7a39748
Add permissions foundation ()
* 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
c3b1121d77
Add group foundation ()
Add group foundation
2018-10-08 16:35:38 +02:00
Paulus Schoutsen
a559c06d6b
Make it easier for auth to consume newer formats () 2018-10-04 10:41:13 +02:00
Jason Hu
ff78a5b04b Track refresh token last usage information ()
* 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 ()
* 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
Ville Skyttä
649f17fe47 Add type hints to homeassistant.auth ()
* Always load users in auth store before use

* Use namedtuple instead of dict for user meta

* Ignore auth store tokens with invalid created_at

* Add type hints to homeassistant.auth
2018-08-16 22:25:41 +02:00
Paulus Schoutsen
e776f88eec
Use JWT for access tokens ()
* Use JWT for access tokens

* Update requirements

* Improvements
2018-08-14 21:14:12 +02:00
Paulus Schoutsen
b6ca03ce47
Reorg auth () 2018-07-13 11:43:08 +02:00