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