mirror of
https://github.com/home-assistant/core.git
synced 2025-05-13 18:39:14 +00:00

* initial oauth2 implementation * fix unload_entry * read old yaml/entry config * update tests * fix: pylint on tests * Apply suggestions from code review Co-authored-by: Robert Resch <robert@resch.dev> * fix constants, formatting * use runtime_data * Apply suggestions from code review Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * fix missing import * adopt to PointData dataclass * fix typing * add more strings (copied from weheat) * move the PointData dataclass to avoid circular imports * use configflow inspired by withings * raise ConfigEntryAuthFailed * it is called entry_lock * fix webhook issue * fix oauth_create_entry * stop using async_forward_entry_setup * Fixup * fix strings * fix issue that old config might be without unique_id * parametrize tests * Update homeassistant/components/point/config_flow.py * Update tests/components/point/test_config_flow.py * Fix --------- Co-authored-by: Robert Resch <robert@resch.dev> Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
15 lines
483 B
Python
15 lines
483 B
Python
"""application_credentials platform the Minut Point integration."""
|
|
|
|
from homeassistant.components.application_credentials import AuthorizationServer
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from .const import OAUTH2_AUTHORIZE, OAUTH2_TOKEN
|
|
|
|
|
|
async def async_get_authorization_server(hass: HomeAssistant) -> AuthorizationServer:
|
|
"""Return authorization server."""
|
|
return AuthorizationServer(
|
|
authorize_url=OAUTH2_AUTHORIZE,
|
|
token_url=OAUTH2_TOKEN,
|
|
)
|