Home Assistant Unofficial Reference 2024.12.1
application_credentials.py
Go to the documentation of this file.
1 """Application credentials platform for iotty."""
2 
3 from __future__ import annotations
4 
5 from homeassistant.components.application_credentials import AuthorizationServer
6 from homeassistant.core import HomeAssistant
7 
8 OAUTH2_AUTHORIZE = "https://auth.iotty.com/.auth/oauth2/login"
9 OAUTH2_TOKEN = "https://auth.iotty.com/.auth/oauth2/token"
10 
11 
12 async def async_get_authorization_server(hass: HomeAssistant) -> AuthorizationServer:
13  """Return authorization server."""
14  return AuthorizationServer(
15  authorize_url=OAUTH2_AUTHORIZE,
16  token_url=OAUTH2_TOKEN,
17  )
AuthorizationServer async_get_authorization_server(HomeAssistant hass)