mirror of https://github.com/home-assistant/core
24 lines
917 B
Python
24 lines
917 B
Python
"""application_credentials platform the Google Photos integration."""
|
|
|
|
from homeassistant.components.application_credentials import AuthorizationServer
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from .const import OAUTH2_AUTHORIZE, OAUTH2_TOKEN
|
|
|
|
|
|
async def async_get_authorization_server(hass: HomeAssistant) -> AuthorizationServer:
|
|
"""Return authorization server."""
|
|
return AuthorizationServer(
|
|
authorize_url=OAUTH2_AUTHORIZE,
|
|
token_url=OAUTH2_TOKEN,
|
|
)
|
|
|
|
|
|
async def async_get_description_placeholders(hass: HomeAssistant) -> dict[str, str]:
|
|
"""Return description placeholders for the credentials dialog."""
|
|
return {
|
|
"oauth_consent_url": "https://console.cloud.google.com/apis/credentials/consent",
|
|
"more_info_url": "https://www.home-assistant.io/integrations/google_photos/",
|
|
"oauth_creds_url": "https://console.cloud.google.com/apis/credentials",
|
|
}
|