Home Assistant Unofficial Reference 2024.12.1
application_credentials.py
Go to the documentation of this file.
1 """Application credentials platform for neato."""
2 
3 from pybotvac import Neato
4 
6  AuthorizationServer,
7  ClientCredential,
8 )
9 from homeassistant.core import HomeAssistant
10 from homeassistant.helpers import config_entry_oauth2_flow
11 
12 from . import api
13 
14 
16  hass: HomeAssistant, auth_domain: str, credential: ClientCredential
17 ) -> config_entry_oauth2_flow.AbstractOAuth2Implementation:
18  """Return auth implementation for a custom auth implementation."""
19  vendor = Neato()
21  hass,
22  auth_domain,
23  credential,
25  authorize_url=vendor.auth_endpoint,
26  token_url=vendor.token_endpoint,
27  ),
28  )
config_entry_oauth2_flow.AbstractOAuth2Implementation async_get_auth_implementation(HomeAssistant hass, str auth_domain, ClientCredential credential)