1
mirror of https://github.com/home-assistant/core synced 2024-09-12 15:16:21 +02:00
Commit Graph

61 Commits

Author SHA1 Message Date
Robert Resch
6223b1f599
Add ws endpoint "auth/delete_all_refresh_tokens" (#98976)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-08-29 15:57:54 +02:00
Erik Montnemery
8053073a77
Add empty config schema to integrations a-c (#93608) 2023-05-29 14:38:33 -04:00
Franck Nijhof
3b5fd4bd06
Enable Ruff TRY004 (#86811) 2023-01-30 14:06:52 +01: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
Paulus Schoutsen
59878ea1ef
Indieauth updates (#76880) 2022-08-16 17:17:10 -04:00
Marc Mueller
563ec67d39
Add strict typing for auth (#75586) 2022-08-16 10:10:37 -04:00
epenet
6da409d6e5
Remove unused constant from auth (#72953) 2022-06-03 08:12:38 -07:00
Paulus Schoutsen
a733b92389
Include provider type in auth token response (#72560) 2022-05-27 10:31:48 -07:00
Paulus Schoutsen
ff3374b4e0
Use modern WS API for auth integration + add auth provider type to refresh token info (#72552) 2022-05-26 13:06:34 -07:00
Marc Mueller
9b9b553521
Disable no-self-use [pylint] (#70641)
* Disable no-self-use

* Remove disable comments
2022-04-25 07:41:01 -07:00
Allen Porter
c07100e519
Move Local OAuth http endpoint registration to auth component (#69507) 2022-04-06 22:34:31 -07:00
Paulus Schoutsen
63f8e437ed
Add Home Assistant Content user (#64337) 2022-01-21 10:06:39 -08:00
Erik Montnemery
9c9dc4cb8c
Import websocket_api (part 1) (#63905) 2022-01-11 18:24:08 +01:00
epenet
545e321002
Add init type hints [a] (#63098)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-30 21:17:05 -08:00
Paulus Schoutsen
914f7f85ec
Add local only users (#57598) 2021-11-29 14:01:03 -08:00
Paulus Schoutsen
c6ec84d0cf
Remove store user as auth result (#60468) 2021-11-28 14:14:52 +01:00
Marc Mueller
2b72b7b7b9
Use assignment expressions 09 (#57790) 2021-10-17 20:19:56 +02: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
Ville Skyttä
cc97502a0c
Use HTTPStatus instead of HTTP_* consts in aiohttp web response statuses (#56541) 2021-10-01 09:27:44 -07:00
Ville Skyttä
d8d34fdd3b
Prefer HTTPStatus over int in HA view JSON functions (#56504)
* Prefer HTTPStatus over int in HA view JSON functions

* Update zwave tests to not expect a fixed typo
2021-09-22 21:59:52 +03:00
Marc Mueller
48bada5a18
Update pylint to 2.11.1 (#56364) 2021-09-18 13:52:59 +02:00
Marc Mueller
76199c0eb2
Update typing 04 (#48037) 2021-03-17 23:34:25 +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
625bbe6238
Cleanup unused loggers (components A-M) (#41600) 2020-10-12 16:59:05 +02:00
Franck Nijhof
cc4ebc925c
Improve X-Forwarded-* request headers handling (#38696)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-08-11 22:57:50 +02:00
springstan
4c38e6cfa5
Use HTTP_BAD_REQUEST constant (#33797) 2020-04-09 21:43:42 +02:00
springstan
bc26be3c11
Add and use HTTP_FORBIDDEN constant (#33839) 2020-04-09 17:41:17 +02:00
springstan
8d61893c39
Use HTTP_OK constant (#33798)
* Use http ok constant

* Remove incorrect use

* Run isort

* Fix pylint by adding missing imports

* Fix pylint by fixing one import
2020-04-08 11:47:38 -05:00
Bas Nijholt
6ad3b6426a sort imports according to PEP8 for auth (#29619) 2019-12-08 14:55:23 +01:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
cgtobi
2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2c.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00
Robbie Trencheny
f5c677146a
Make inlined JSON example valid 2019-04-10 21:58:50 -07:00
Paulus Schoutsen
8bfbe3e085
Add update user command (#21922)
* Add update user command

* Add is_admin to current user
2019-03-11 12:08:02 -07:00
Paulus Schoutsen
3da0ed9cc7
Onboarding to generate auth code (#21777) 2019-03-08 13:51:42 -08:00
Paulus Schoutsen
312d49caec Allow creating signed urls (#17759)
* Allow creating signed urls

* Fix parameter

* Lint
2018-10-25 16:44:57 +02:00
Paulus Schoutsen
c7c0ed89c8 Convert auth websocket commands to use async_response decorator (#17755) 2018-10-24 15:23:09 +02:00
Paulus Schoutsen
2e6346ca43 Break up websocket 2 (#17028)
* Break up websocket 2

* Lint+Test

* Lintttt

* Rename
2018-10-01 16:09:31 +02:00
Jason Hu
75c372021d Fix example for long-lived access token WS API (#16882) 2018-09-26 11:20:48 +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
34d369ba26 Return if refresh token is current used one in WS API (#16575) 2018-09-12 09:49:44 +02:00
Paulus Schoutsen
0db13a99aa Add websocket commands for refresh tokens (#16559)
* Add websocket commands for refresh tokens

* Comment
2018-09-11 09:08:03 -07: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
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
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
Jason Hu
93d6fb8c60
Break up components/auth (#15713) 2018-07-28 17:54:26 -07:00
Jerad Meisner
cbb5d34167 Added user credentials to current_user ws endpoint. (#15558)
* Added user credentials to current_user ws endpoint.

* Comments. Added another test.

* Return list of credentials.
2018-07-25 10:34:18 +02:00
Jason Hu
d7690c5fda Add ipban for failed login attempt in new login flow (#15551)
* Add ipban for failed login attempt in new login flow

* Address review comment

* Use decorator to clean up code
2018-07-24 10:09:52 +02:00
Paulus Schoutsen
4e7dbf9ce5
Allow system users to refresh tokens (#15574) 2018-07-23 14:06:09 +02:00