1
0
mirror of https://github.com/home-assistant/core.git synced 2026-06-02 13:44:32 +01:00
Files
core/homeassistant/components/ondilo_ico/oauth_impl.py
T
2021-05-20 15:58:17 +02:00

33 lines
965 B
Python

"""Local implementation of OAuth2 specific to Ondilo to hard code client id and secret and return a proper name."""
from homeassistant.core import HomeAssistant
from homeassistant.helpers.config_entry_oauth2_flow import LocalOAuth2Implementation
from .const import (
DOMAIN,
OAUTH2_AUTHORIZE,
OAUTH2_CLIENTID,
OAUTH2_CLIENTSECRET,
OAUTH2_TOKEN,
)
class OndiloOauth2Implementation(LocalOAuth2Implementation):
"""Local implementation of OAuth2 specific to Ondilo to hard code client id and secret and return a proper name."""
def __init__(self, hass: HomeAssistant) -> None:
"""Just init default class with default values."""
super().__init__(
hass,
DOMAIN,
OAUTH2_CLIENTID,
OAUTH2_CLIENTSECRET,
OAUTH2_AUTHORIZE,
OAUTH2_TOKEN,
)
@property
def name(self) -> str:
"""Name of the implementation."""
return "Ondilo"