Commit Graph

10 Commits (ad47ece5c6959d3af65a22b7316dc6c597b932b8)

Author SHA1 Message Date
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
Paulus Schoutsen 4e3faf6108
Fix typo () 2018-09-11 12:55:05 +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
Paulus Schoutsen cdb8361050 Add support for revoking refresh tokens ()
* Add support for revoking refresh tokens

* Lint

* Split revoke logic in own method

* Simplify

* Update docs
2018-08-21 11:02:55 -07:00
Paulus Schoutsen 2ad0bd4036
Split out storage delay save ()
* Split out storage delayed write

* Update code using delayed save

* Fix tests

* Fix typing test

* Add callback decorator
2018-08-17 20:18:21 +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 ed0cfc4f31
Add user via cmd line creates owner ()
* 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 ()
* 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 () 2018-07-13 11:43:08 +02:00