Paulus Schoutsen
c3b1121d77
Add group foundation ( #16935 )
...
Add group foundation
2018-10-08 16:35:38 +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
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
47755fb1e9
Add Time-based Onetime Password Multi-factor Authentication Module ( #16129 )
...
* Add Time-based Onetime Password Multi-factor Auth
Add TOTP setup flow, generate QR code
* Resolve rebase issue
* Use svg instead png for QR code
* Lint and typing
* Fix translation
* Load totp auth module by default
* use <svg> tag instead markdown image
* Update strings
* Cleanup
2018-08-26 22:38:52 +02:00
Jason Hu
e8775ba2b4
Add multi-factor auth module setup flow ( #16141 )
...
* Add mfa setup flow
* Lint
* Address code review comment
* Fix unit test
* Add assertion for WS response ordering
* Missed a return
* Remove setup_schema from MFA base class
* Move auth.util.validate_current_user -> webscoket_api.ws_require_user
2018-08-24 10:17:43 -07:00
Ville Skyttä
dd9d53c83e
Update pydocstyle to 2.1.1 and flake8-docstrings to 1.3.0 ( #14557 )
...
* Update pydocstyle to 2.1.1 and flake8-docstrings to 1.3.0
* Pydocstyle D401 fixes
2018-08-24 10:28:43 +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
Jason Hu
1ce51bfbd6
Refactoring login flow ( #16104 )
...
* Abstract LoginFlow
* Lint and typings
2018-08-21 11:03:38 -07: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
00c6f56cc8
Allow finish_flow callback to change data entry result type ( #16100 )
...
* Allow finish_flow callback to change data entry result type
* Add unit test
2018-08-21 10:48:24 -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
Ville Skyttä
649f17fe47
Add type hints to homeassistant.auth ( #15853 )
...
* 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 ( #15972 )
...
* Use JWT for access tokens
* Update requirements
* Improvements
2018-08-14 21:14:12 +02:00
Jason Hu
50daef9a52
Add context to login flow ( #15914 )
...
* Add context to login flow
* source -> context
* Fix unit test
* Update comment
2018-08-13 11:27:18 +02:00
Jason Hu
f58425dd3c
Refactor data entry flow ( #15883 )
...
* Refactoring data_entry_flow and config_entry_flow
Move SOURCE_* to config_entries
Change data_entry_flow.FlowManager.async_init() source param default
to None
Change this first step_id as source or init if source is None
_BaseFlowManagerView pass in SOURCE_USER as default source
* First step of data entry flow decided by _async_create_flow() now
* Lint
* Change helpers.config_entry_flow.DiscoveryFlowHandler default step
* Change FlowManager.async_init source param to context dict param
2018-08-09 13:24:14 +02:00
Andrey
8ee3b535ef
Add disallow_untyped_calls to mypy check. ( #15661 )
...
* Add disallow_untyped_calls to mypy check.
* Fix generator
2018-07-31 15:00:17 +01:00
Paulus Schoutsen
2fcacbff23
Allow auth providers to influence is_active ( #15557 )
...
* Allow auth providers to influence is_active
* Fix auth script test
2018-07-19 22:10:36 +02:00
Paulus Schoutsen
8797cb78a9
Add current user WS command ( #15485 )
2018-07-17 09:24:51 +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