Home Assistant Unofficial Reference
2024.12.1
oauth_impl.py
Go to the documentation of this file.
1
"""Local implementation of OAuth2 specific to Ondilo to hard code client id and secret and return a proper name."""
2
3
from
homeassistant.core
import
HomeAssistant
4
from
homeassistant.helpers.config_entry_oauth2_flow
import
LocalOAuth2Implementation
5
6
from
.const
import
(
7
DOMAIN,
8
OAUTH2_AUTHORIZE,
9
OAUTH2_CLIENTID,
10
OAUTH2_CLIENTSECRET,
11
OAUTH2_TOKEN,
12
)
13
14
15
class
OndiloOauth2Implementation
(
LocalOAuth2Implementation
):
16
"""Local implementation of OAuth2 specific to Ondilo to hard code client id and secret and return a proper name."""
17
18
def
__init__
(self, hass: HomeAssistant) ->
None
:
19
"""Just init default class with default values."""
20
super().
__init__
(
21
hass,
22
DOMAIN,
23
OAUTH2_CLIENTID,
24
OAUTH2_CLIENTSECRET,
25
OAUTH2_AUTHORIZE,
26
OAUTH2_TOKEN,
27
)
28
29
@property
30
def
name
(self) -> str:
31
"""Name of the implementation."""
32
return
"Ondilo"
homeassistant.components.ondilo_ico.oauth_impl.OndiloOauth2Implementation
Definition:
oauth_impl.py:15
homeassistant.components.ondilo_ico.oauth_impl.OndiloOauth2Implementation.__init__
None __init__(self, HomeAssistant hass)
Definition:
oauth_impl.py:18
homeassistant.components.ondilo_ico.oauth_impl.OndiloOauth2Implementation.name
str name(self)
Definition:
oauth_impl.py:30
homeassistant.helpers.config_entry_oauth2_flow.LocalOAuth2Implementation
Definition:
config_entry_oauth2_flow.py:114
homeassistant.core
Definition:
core.py:1
homeassistant.helpers.config_entry_oauth2_flow
Definition:
config_entry_oauth2_flow.py:1
core
homeassistant
components
ondilo_ico
oauth_impl.py
Generated by
1.9.1