Commit graph

46 commits

Author SHA1 Message Date
epenet
7332bc5faf
Improve type hints in http tests () 2024-07-05 14:37:00 +02:00
Robert Resch
bae008b0e2
Remove legacy_api_password auth provider () 2024-06-19 22:46:30 +02:00
Robert Resch
cb62f4242e
Remove strict connection () 2024-05-24 15:50:22 +02:00
Robert Resch
bcc2dd99b2
Rename strict connection static page to guard page () 2024-04-24 10:29:59 +02:00
Robert Resch
348e1df949
Add strict connection ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-12 14:47:46 +02:00
Marc Mueller
c88b337600
Add empty line after module docstring [tests f-k] () 2024-03-08 14:50:04 +01:00
Marc Mueller
531e25cbc6
Change KEY_HASS to be an aiohttp AppKey () 2024-03-07 13:37:48 +01:00
J. Nick Koston
2eea658fd8
Convert getting and removing access tokens to normal functions () 2024-01-22 20:51:33 -10:00
Robert Resch
852fb58ca8
Extend auth/providers endpoint and add /api/person/list endpoint for local ip requests ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-11-24 17:11:54 +01:00
Paulus Schoutsen
12352b2ce1
Always enforce URL param ordering for signed URLs ()
Always enforce URL param ordering
2023-03-22 22:54:09 -04:00
Franck Nijhof
ed79265843
Enable Ruff PT006 ()
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet
9404a107b2
Add type hints to integration tests (part 10) () 2023-02-13 10:25:26 +01:00
epenet
37a2040d7b
Add type hints to integration tests (h-i) () 2023-02-08 18:12:56 +01:00
Christopher Bailey
0461ec1566
Fix auth_sign_path with query params (take 2) () 2022-06-22 10:09:21 -05:00
J. Nick Koston
1e0a3246f4
Revert "Fix auth_sign_path with query params ()" () 2022-06-21 22:45:16 -05:00
Christopher Bailey
67618311fa
Fix auth_sign_path with query params ()
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-06-21 14:21:47 -05:00
Paulus Schoutsen
63f8e437ed
Add Home Assistant Content user () 2022-01-21 10:06:39 -08:00
Paulus Schoutsen
914f7f85ec
Add local only users () 2021-11-29 14:01:03 -08:00
Ville Skyttä
b52c5c82b1
Use http.HTTPStatus in components/[gh]* () 2021-10-23 20:34:53 +02:00
Ville Skyttä
1aa7c87151
Remove redundant aiohttp response status=200 kwargs ()
* Remove redundant aiohttp response status=200 kwargs

* Remove some more in h.c.auth

* Restore explicit status=HTTP_OK for auth and webhook per review request
2021-09-21 10:51:12 -07:00
Franck Nijhof
cdd1f6b2f0
Always load middle to handle forwarded proxy data () 2021-06-01 09:38:55 -07:00
Franck Nijhof
65cf2fcb6f
Drop asynctest () 2021-01-01 22:31:56 +01:00
Franck Nijhof
cc4ebc925c
Improve X-Forwarded-* request headers handling ()
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
Paulus Schoutsen
2af984917e
Use asynctest-mock in most places ()
* Use asynctest-mock in most places

* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
Franck Nijhof
d7e9959442
String formatting improvements for tests (2) () 2020-04-05 00:33:07 +02:00
Bas Nijholt
3d10bb3647 Sort imports according to PEP8 for http () 2019-12-09 11:59:38 +01:00
Paulus Schoutsen
3231e22ddf
Remove direct authentication via trusted networks or API password ()
* Remove direct authentication via trusted networks and API password

* Fix tests
2019-10-14 14:56:45 -07:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Jason Hu
fe1840f901 Deprecate http.api_password ()
* Deprecated http.api_password

* Deprecated ApiConfig.api_password

GitHub Drafted PR would trigger CI after changed it to normal PR.
I have to commit a comment change to trigger it

* Trigger CI

* Adjust if- elif chain in auth middleware
2019-03-10 19:55:36 -07:00
Paulus Schoutsen
d1a621601d No more opt-out auth ()
* No more opt-out auth

* Fix var
2018-12-02 16:32:53 +01:00
Paulus Schoutsen
d014517ce2
Always set hass_user () 2018-11-30 17:32:47 +01:00
Paulus Schoutsen
c2f8dfcb9f
Legacy api fix ()
* Set user for API password requests

* Fix tests

* Fix typing
2018-11-27 10:41:44 +01:00
Paulus Schoutsen
312d49caec Allow creating signed urls ()
* Allow creating signed urls

* Fix parameter

* Lint
2018-10-25 16:44:57 +02:00
Ville Skyttä
dbd0763f83 Grammar and spelling fixes () 2018-08-19 22:29:08 +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
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
Jason Hu
f874efb224 By default to use access_token if hass.auth.active ()
* Force to use access_token if hass.auth.active

* Not allow Basic auth with api_password if hass.auth.active

* Block websocket api_password auth when hass.auth.active

* Add legacy_api_password auth provider

* lint

* lint
2018-06-30 22:31:36 -04:00
Colin O'Dell
19f2bbf52f Only use the X-Forwarded-For header if connection is from a trusted network ()
See https://github.com/home-assistant/home-assistant/issues/14345#issuecomment-400854569
2018-06-28 09:16:11 -04:00
Paulus Schoutsen
89a19c89a7 Fix aiohttp deprecation warnings ()
* Fix aiohttp deprecation warnings

* Fix Ring deprecation warning

* Lint
2018-03-15 21:49:49 +01:00
Boyi C
321eb2ec6f Move HomeAssistantView to separate file. Convert http to async syntax. [skip ci] ()
* Move HomeAssistantView to separate file. Convert http to async syntax.

* pylint

* websocket api

* update emulated_hue for async/await

* Lint
2018-03-08 17:51:49 -08:00
Paulus Schoutsen
f32911d036 Cleanup http ()
* Clean up HTTP component

* Clean up HTTP mock

* Remove unused import

* Fix test

* Lint
2018-02-15 22:06:14 +01:00
Paulus Schoutsen
6fb55b363a Add OwnTracks over HTTP ()
* Add OwnTracks over HTTP

* Fix tests
2017-09-28 09:49:35 +02:00
Paulus Schoutsen
d369d70ca5 Fix tests ()
* Remove global hass

* Http.auth test no longer spin up server

* Remove server usage from http.ban test

* Remove setupModule from test device_sun_light_trigger

* Update common.py
2017-05-19 07:37:39 -07:00
Paulus Schoutsen
2650c73a89 Split bootstrap into bs + setup ()
* Split bootstrap into bs + setup

* Lint
2017-03-05 10:41:54 +01:00
Paulus Schoutsen
32ffd006fa Reorganize HTTP component ()
* Move HTTP to own folder

* Break HTTP into middlewares

* Lint

* Split tests per middleware

* Clean up HTTP tests

* Make HomeAssistantViews more stateless

* Lint

* Make HTTP setup async
2016-11-25 13:04:06 -08:00