Home Assistant Unofficial Reference 2024.12.1
application_credentials.py
Go to the documentation of this file.
1 """application_credentials platform for Google Mail."""
2 
3 from homeassistant.components.application_credentials import AuthorizationServer
4 from homeassistant.core import HomeAssistant
5 
6 
7 async def async_get_authorization_server(hass: HomeAssistant) -> AuthorizationServer:
8  """Return authorization server."""
9  return AuthorizationServer(
10  "https://accounts.google.com/o/oauth2/v2/auth",
11  "https://oauth2.googleapis.com/token",
12  )
13 
14 
15 async def async_get_description_placeholders(hass: HomeAssistant) -> dict[str, str]:
16  """Return description placeholders for the credentials dialog."""
17  return {
18  "oauth_consent_url": "https://console.cloud.google.com/apis/credentials/consent",
19  "more_info_url": "https://www.home-assistant.io/integrations/google_mail/",
20  "oauth_creds_url": "https://console.cloud.google.com/apis/credentials",
21  }
AuthorizationServer async_get_authorization_server(HomeAssistant hass)